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; |