Index: chrome/browser/profiles/profile_impl.cc |
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
index b1afc140d55c0db616108bced6bc83d0ceb63cc2..d9f3b086ed1e09f5c71850dd517ba29f5a2ef698 100644 |
--- a/chrome/browser/profiles/profile_impl.cc |
+++ b/chrome/browser/profiles/profile_impl.cc |
@@ -152,6 +152,10 @@ void GetCacheParameters(ContextType type, FilePath* cache_path, |
*cache_path = CommandLine::ForCurrentProcess()->GetSwitchValuePath( |
switches::kDiskCacheDir); |
} |
+ // 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); |
const char* arg = kNormalContext == type ? switches::kDiskCacheSize : |
switches::kMediaCacheSize; |