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

Unified Diff: chrome/browser/protector/protected_prefs_watcher.cc

Issue 10854009: Extension white and force lists (set by policy) should have priority over auto-updated Google black… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased and merged Created 8 years, 4 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/extensions/test_extension_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/protector/protected_prefs_watcher.cc
diff --git a/chrome/browser/protector/protected_prefs_watcher.cc b/chrome/browser/protector/protected_prefs_watcher.cc
index 46ac3a320e3a386447a5cc1fb196049145bdef9e..e51ffd84b171833552d75706089b8e20ee7b56e4 100644
--- a/chrome/browser/protector/protected_prefs_watcher.cc
+++ b/chrome/browser/protector/protected_prefs_watcher.cc
@@ -200,17 +200,10 @@ void ProtectedPrefsWatcher::EnsurePrefsMigration() {
}
bool ProtectedPrefsWatcher::UpdateCachedPrefs() {
- // Direct access to the extensions prefs is required becase ExtensionService
- // may not yet have been initialized.
- const base::DictionaryValue* extension_prefs;
- const base::Value* extension_prefs_value =
- profile_->GetPrefs()->GetUserPrefValue(ExtensionPrefs::kExtensionsPref);
- if (!extension_prefs_value ||
- !extension_prefs_value->GetAsDictionary(&extension_prefs)) {
- return false;
- }
+ // ExtensionService may not yet have been initialized, so using static method
+ // exposed for this purpose.
ExtensionPrefs::ExtensionIds extension_ids =
- ExtensionPrefs::GetExtensionsFrom(extension_prefs);
+ ExtensionPrefs::GetExtensionsFrom(profile_->GetPrefs());
if (extension_ids == cached_extension_ids_)
return false;
cached_extension_ids_.swap(extension_ids);
« no previous file with comments | « chrome/browser/extensions/test_extension_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698