mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Enforce cache_path requirements for NetworkService (see issue #2622).
This change adds a new CefSettings.root_cache_path value that must be either equal to or a parent directory of all CefSettings.cache_path and CefRequestContextSettings.cache_path values. The sandbox may block read/write access from the NetworkService to directories that do not meet this requirement. To test: Run cefclient with a combination of the following flags: --cache-path=c:\temp\cache Cache data should be persisted to the specified directory. --request-context-per-browser A separate numbered cache directory should be created underneath the cache-path directory for each new browser instance. --enable-network-service --disable-extensions Same tests, but with NetworkService enabled. Known issues: - When NetworkService is enabled a C:\temp\cache\cache\Cache directory is created (should be C:\temp\cache\Cache).
This commit is contained in:
@@ -73,10 +73,13 @@ class CefContext {
|
||||
|
||||
CefTraceSubscriber* GetTraceSubscriber();
|
||||
|
||||
// Populate the request context settings based on CefSettings and command-
|
||||
// line flags.
|
||||
// Populate request context settings for the global system context based on
|
||||
// CefSettings and command-line flags.
|
||||
void PopulateRequestContextSettings(CefRequestContextSettings* settings);
|
||||
|
||||
// Verify that |cache_path| is valid and create it if necessary.
|
||||
bool ValidateCachePath(const base::FilePath& cache_path);
|
||||
|
||||
private:
|
||||
void OnContextInitialized();
|
||||
|
||||
|
Reference in New Issue
Block a user