| 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..52ec42349167473b322f9fbce5e925aa20224d38 100644
|
| --- a/chrome/browser/ui/app_list/app_list_syncable_service.h
|
| +++ b/chrome/browser/ui/app_list/app_list_syncable_service.h
|
| @@ -7,25 +7,41 @@
|
|
|
| #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 ExtensionService;
|
| class Profile;
|
|
|
| namespace app_list {
|
|
|
| class AppListModel;
|
|
|
| -// Keyed Service that owns, stores, and syncs an AppListModel for a profile.
|
| +// Keyed Service that owns, stores, and syncs an AppListModel for an
|
| +// ExtensionSystem and corresponding 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);
|
| + // Create an empty model. Then, if |extension_service| is non-NULL and ready,
|
| + // populate it. Otherwise populate the model once extensions become ready.
|
| + AppListSyncableService(Profile* profile, ExtensionService* extension_service);
|
| +
|
| virtual ~AppListSyncableService();
|
|
|
| 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_;
|
|
|
|
|