Here is what is happening :
I always used a 'workaround' method to select different cookies directories, which consists in close my app and reopen it again setting GlobalCEFApp.Cache to the new cookies dir i want, and passing
nil to TCefRequestContextRef.New context.
This always worked, but has the inconvenient to the user having to close and reopen the app whenever he wants to switch cookies dir.
So that's why i'm trying to implement this new way , which consists in destroy the browsers and re-create it with the new context.
So here is what i'm doing :
1 - I set GlobalCEFApp.RootCache to ''C:\Users\admin\AppData\Roaming\Myapp'
2 - I leave GlobalCEFApp.Cache alone, don't set anything to it.
3 - I set TCefRequestContextRef.New('C:\Users\admin\AppData\Roaming\Myapp\Cookies', '', false, false, false);
4 - Browser is created and i can see the 'C:\Users\admin\AppData\Roaming\Myapp\Cookies' directory was created indeed.
4 - I then navigate to a site that requires login, for instance Facebook.com, and log in on it.
5 - I close my app.
6 - I open my app again BUT i'm not logged on Facebook anymore.
If i switch to the 'old' method (specify 'C:\Users\admin\AppData\Roaming\Myapp\Cookies' on GlobalCEFApp.Cache and pass
nil to the TCefRequestContextRef.New) , it works again.
What am i missing ?
