Implemented a policy for centralized setting of the --disk-cache-dir flag.
This has been wanted policy so that we can safely use remote locations for user profiles which is prone to errors especially with web databases open. This should allow more people to use this kind of setup.
BUG=78619
TEST=For the policy wiring existing policy tests for the cache dir effect manually.
Review URL: http://codereview.chromium.org/7013046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86425 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 958f805d..3efa1364 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -921,6 +921,10 @@
local_state_.get(), NULL);
plugin_finder_disabled_pref_.MoveToThread(BrowserThread::IO);
+ // Initialize the disk cache location policy. This policy is not hot update-
+ // able so we need to have it when initializing the profiles.
+ local_state_->RegisterFilePathPref(prefs::kDiskCacheDir, FilePath());
+
// This is observed by ChildProcessSecurityPolicy, which lives in content/
// though, so it can't register itself.
local_state_->RegisterListPref(prefs::kDisabledSchemes);