Chromium Code Reviews| Index: chrome/browser/profiles/profile_impl.cc |
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
| index c6eb3f6193e556de6e5bac0df734ff6a0663c67f..54cce2720ec4fc155c6cc88c5800063fd788be20 100644 |
| --- a/chrome/browser/profiles/profile_impl.cc |
| +++ b/chrome/browser/profiles/profile_impl.cc |
| @@ -198,6 +198,17 @@ void GetCacheParameters(ContextType type, FilePath* cache_path, |
| } else if (*max_size < 0) { |
| *max_size = 0; |
| } |
| +#if !defined(OS_CHROMEOS) |
| + // If a policy is controlling the cache size it should override any |
| + // command line flags. |
| + if (kNormalContext == type) { |
| + if (prefs && prefs->IsManagedPreference(prefs::kDiskCacheSize)) |
| + *max_size = prefs->GetInteger(prefs::kDiskCacheSize); |
| + } else { |
| + if (prefs && prefs->IsManagedPreference(prefs::kMediaCacheSize)) |
| + *max_size = prefs->GetInteger(prefs::kMediaCacheSize); |
| + } |
|
Joao da Silva
2011/11/15 14:12:53
I think this policy should be user policy. The cac
|
| +#endif |
| } |
| FilePath GetCachePath(const FilePath& base) { |