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

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

Issue 77773002: Ensure the ExtensionSystem is ready before initializing an ExtensionAppModelBuilder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 years, 1 month 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
Index: chrome/browser/ui/app_list/app_list_syncable_service.h
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service.h b/chrome/browser/ui/app_list/app_list_syncable_service.h
index 0bd7e266ec59dd0cb88ee335d6f0635cc434da38..cec24166290be792fc4e79918e24d8a0cf871b14 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service.h
+++ b/chrome/browser/ui/app_list/app_list_syncable_service.h
@@ -7,6 +7,8 @@
#include "base/memory/scoped_ptr.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
class ExtensionAppModelBuilder;
class Profile;
@@ -17,7 +19,8 @@ class AppListModel;
// Keyed Service that owns, stores, and syncs an AppListModel for a profile.
// TODO(stevenjb): Integrate with Sync. crbug.com/305024.
-class AppListSyncableService : public BrowserContextKeyedService {
+class AppListSyncableService : public BrowserContextKeyedService,
+ public content::NotificationObserver {
public:
explicit AppListSyncableService(Profile* profile);
virtual ~AppListSyncableService();
@@ -25,7 +28,15 @@ class AppListSyncableService : public BrowserContextKeyedService {
AppListModel* model() { return model_.get(); }
private:
+ void BuildModel();
+
+ // content::NotificationObserver:
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
Profile* profile_;
+ content::NotificationRegistrar registrar_;
scoped_ptr<AppListModel> model_;
scoped_ptr<ExtensionAppModelBuilder> apps_builder_;

Powered by Google App Engine
This is Rietveld 408576698