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:
@@ -193,6 +193,12 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
|
||||
// Based on ProfileImpl::RegisterProfilePrefs.
|
||||
registry->RegisterBooleanPref(prefs::kPrintingEnabled, true);
|
||||
|
||||
// Cache preferences.
|
||||
// Based on ProfileImpl::RegisterProfilePrefs.
|
||||
registry->RegisterFilePathPref(prefs::kDiskCacheDir, cache_path);
|
||||
registry->RegisterIntegerPref(prefs::kDiskCacheSize, 0);
|
||||
registry->RegisterIntegerPref(prefs::kMediaCacheSize, 0);
|
||||
|
||||
// Spell checking preferences.
|
||||
// Modify defaults from SpellcheckServiceFactory::RegisterProfilePrefs.
|
||||
std::string spellcheck_lang =
|
||||
|
Reference in New Issue
Block a user