Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 7013046: Implemented a policy for centralized setting of the --disk-cache-dir flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Protected the policy from hitting ChromeOS. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/policy/configuration_policy_provider_win_unittest.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index c50603d52ffaf9c03737c77be5d762cf11c3e21c..c1ef62497bb1b14c45aaa5ada64e8e001feebd54 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -152,6 +152,12 @@ void GetCacheParameters(ContextType type, FilePath* cache_path,
*cache_path = CommandLine::ForCurrentProcess()->GetSwitchValuePath(
switches::kDiskCacheDir);
}
+#if !defined(OS_CHROMEOS)
+ // And if a policy is set this should have even higher precedence.
+ PrefService* prefs = g_browser_process->local_state();
+ if (prefs && prefs->IsManagedPreference(prefs::kDiskCacheDir))
+ *cache_path = prefs->GetFilePath(prefs::kDiskCacheDir);
+#endif
const char* arg = kNormalContext == type ? switches::kDiskCacheSize :
switches::kMediaCacheSize;
« no previous file with comments | « chrome/browser/policy/configuration_policy_provider_win_unittest.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698