CEF3 or JavaScript API for CEF1 CefSetStoragePath()

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CEF3 or JavaScript API for CEF1 CefSetStoragePath()

Postby user6294 » Thu Nov 01, 2018 9:52 am

I need to change the location of where "Local Storage" is (normally under the chromium cache directory cef_settings_t::cache_path)

I know there is a CefCookieManager::SetStoragePath() in CEF3, is there an equivalent manager class for Local Storage.

Thanks
user6294
Mentor
 
Posts: 83
Joined: Sun Mar 18, 2018 6:57 pm

Re: CEF3 or JavaScript API for CEF1 CefSetStoragePath()

Postby magreenblatt » Thu Nov 01, 2018 10:15 am

user6294 wrote:I know there is a CefCookieManager::SetStoragePath() in CEF3, is there an equivalent manager class for Local Storage.

If you create a CefRequestContext with a unique CefRequestContextSettings.cache_path then localStorage will be stored under that path.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: CEF3 or JavaScript API for CEF1 CefSetStoragePath()

Postby user6294 » Thu Nov 01, 2018 10:48 am

thanks will try that!
user6294
Mentor
 
Posts: 83
Joined: Sun Mar 18, 2018 6:57 pm

Re: CEF3 or JavaScript API for CEF1 CefSetStoragePath()

Postby user6294 » Mon Nov 05, 2018 6:33 am

Hi,

So CefSettings::cache_path sets it globally and using CefRequestContextSettings::cache_path via CefBrowserHost::CreateBrowser() set's it on a per browser basis.

Is there a way to specify more fine-grained control of the directories inside this chromium cache path, namely things like:

Cache/
databases/
IndexedDB/
Local Storage/
Pepper Data/
DevToolsActivePort
. . .
. . .

In particular, I want to specify the location of the "Local Storage" folder inside the chromium cache path only - is that possible?

I want to do this because I am storing an ARCOT token in there and I need that to persist between Virtual Machine sessions under APPDATA
and I don't want to move the whole chromium cache folder there

I sense that it's possible.

Thank You for your time
user6294
Mentor
 
Posts: 83
Joined: Sun Mar 18, 2018 6:57 pm

Re: CEF3 or JavaScript API for CEF1 CefSetStoragePath()

Postby user6294 » Mon Nov 05, 2018 6:35 am

I mean't to say : "I sense that it is not possible"
user6294
Mentor
 
Posts: 83
Joined: Sun Mar 18, 2018 6:57 pm

Re: CEF3 or JavaScript API for CEF1 CefSetStoragePath()

Postby Czarek » Mon Nov 05, 2018 8:53 am

You can create symbolic links to directories using mklink command.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: CEF3 or JavaScript API for CEF1 CefSetStoragePath()

Postby user6294 » Mon Nov 05, 2018 10:06 am

It's the CEF3 and Chromium libraries that programatically create the chromium cache directory and all the other sub-directories.

I want to control where CEF3/Chromium creates this directory via the CEF3 API.

Thanks
user6294
Mentor
 
Posts: 83
Joined: Sun Mar 18, 2018 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 79 guests