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

Unified Diff: chrome/browser/ui/app_list/extension_app_model_builder.h

Issue 409123002: app_list ExtensionAppModelBuilder: Observe and handle changes to prefs::kHideWebStoreIcon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comment Created 6 years, 5 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 | « no previous file | chrome/browser/ui/app_list/extension_app_model_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/extension_app_model_builder.h
diff --git a/chrome/browser/ui/app_list/extension_app_model_builder.h b/chrome/browser/ui/app_list/extension_app_model_builder.h
index 9313af07ad8fcfaaff56f13e349af78ffe24ad26..ce3528d66416d9570af4488756f8f4ff92563695 100644
--- a/chrome/browser/ui/app_list/extension_app_model_builder.h
+++ b/chrome/browser/ui/app_list/extension_app_model_builder.h
@@ -97,9 +97,6 @@ class ExtensionAppModelBuilder : public extensions::InstallObserver,
// Populates the model with apps.
void PopulateApps();
- // Re-sort apps in case app ordinal prefs are changed.
- void ResortApps();
-
// Inserts an app based on app ordinal prefs.
void InsertApp(scoped_ptr<ExtensionAppItem> app);
@@ -116,10 +113,14 @@ class ExtensionAppModelBuilder : public extensions::InstallObserver,
// Returns app instance matching |extension_id| or NULL.
ExtensionAppItem* GetExtensionAppItem(const std::string& extension_id);
- // Initializes the |extension_pref_change_registrar| to listen for extension
- // prefs changes. OnExtensionPreferenceChanged() is called when extension
- // prefs change.
- void InitializePrefChangeRegistrar();
+ // Initializes the |profile_pref_change_registrar_| and the
+ // |extension_pref_change_registrar_| to listen for changes to profile and
+ // extension prefs, and call OnProfilePreferenceChanged() or
+ // OnExtensionPreferenceChanged().
+ void InitializePrefChangeRegistrars();
+
+ // Handles profile prefs changes.
+ void OnProfilePreferenceChanged();
// Handles extension prefs changes.
void OnExtensionPreferenceChanged();
@@ -128,6 +129,9 @@ class ExtensionAppModelBuilder : public extensions::InstallObserver,
app_list::AppListSyncableService* service_;
Profile* profile_;
+ // Registrar used to monitor the profile prefs.
+ PrefChangeRegistrar profile_pref_change_registrar_;
+
// Registrar used to monitor the extension prefs.
PrefChangeRegistrar extension_pref_change_registrar_;
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/extension_app_model_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698