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

Side by Side Diff: chrome/browser/ui/app_list/app_list_syncable_service.h

Issue 599343002: Mirror app list hierarchy data in profile prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@app_list_folder_pref
Patch Set: add unit test Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 18 matching lines...) Expand all
29 29
30 namespace sync_pb { 30 namespace sync_pb {
31 class AppListSpecifics; 31 class AppListSpecifics;
32 } 32 }
33 33
34 namespace app_list { 34 namespace app_list {
35 35
36 class AppListFolderItem; 36 class AppListFolderItem;
37 class AppListItem; 37 class AppListItem;
38 class AppListModel; 38 class AppListModel;
39 class ModelPrefUpdater;
39 40
40 // Keyed Service that owns, stores, and syncs an AppListModel for a profile. 41 // Keyed Service that owns, stores, and syncs an AppListModel for a profile.
41 class AppListSyncableService : public syncer::SyncableService, 42 class AppListSyncableService : public syncer::SyncableService,
42 public KeyedService, 43 public KeyedService,
43 public content::NotificationObserver { 44 public content::NotificationObserver {
44 public: 45 public:
45 struct SyncItem { 46 struct SyncItem {
46 SyncItem(const std::string& id, 47 SyncItem(const std::string& id,
47 sync_pb::AppListSpecifics::AppListItemType type); 48 sync_pb::AppListSpecifics::AppListItemType type);
48 ~SyncItem(); 49 ~SyncItem();
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 190
190 // Returns true if an extension matching |id| exists and was installed by 191 // Returns true if an extension matching |id| exists and was installed by
191 // an OEM (extension->was_installed_by_oem() is true). 192 // an OEM (extension->was_installed_by_oem() is true).
192 bool AppIsOem(const std::string& id); 193 bool AppIsOem(const std::string& id);
193 194
194 Profile* profile_; 195 Profile* profile_;
195 extensions::ExtensionSystem* extension_system_; 196 extensions::ExtensionSystem* extension_system_;
196 content::NotificationRegistrar registrar_; 197 content::NotificationRegistrar registrar_;
197 scoped_ptr<AppListModel> model_; 198 scoped_ptr<AppListModel> model_;
198 scoped_ptr<ModelObserver> model_observer_; 199 scoped_ptr<ModelObserver> model_observer_;
200 scoped_ptr<ModelPrefUpdater> model_pref_updater_;
199 scoped_ptr<ExtensionAppModelBuilder> apps_builder_; 201 scoped_ptr<ExtensionAppModelBuilder> apps_builder_;
200 scoped_ptr<syncer::SyncChangeProcessor> sync_processor_; 202 scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
201 scoped_ptr<syncer::SyncErrorFactory> sync_error_handler_; 203 scoped_ptr<syncer::SyncErrorFactory> sync_error_handler_;
202 SyncItemMap sync_items_; 204 SyncItemMap sync_items_;
203 syncer::SyncableService::StartSyncFlare flare_; 205 syncer::SyncableService::StartSyncFlare flare_;
204 bool initial_sync_data_processed_; 206 bool initial_sync_data_processed_;
205 bool first_app_list_sync_; 207 bool first_app_list_sync_;
206 std::string oem_folder_name_; 208 std::string oem_folder_name_;
207 209
208 // Provides integration with Drive apps. 210 // Provides integration with Drive apps.
209 scoped_ptr<DriveAppProvider> drive_app_provider_; 211 scoped_ptr<DriveAppProvider> drive_app_provider_;
210 212
211 DISALLOW_COPY_AND_ASSIGN(AppListSyncableService); 213 DISALLOW_COPY_AND_ASSIGN(AppListSyncableService);
212 }; 214 };
213 215
214 } // namespace app_list 216 } // namespace app_list
215 217
216 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ 218 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_prefs_factory.cc ('k') | chrome/browser/ui/app_list/app_list_syncable_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698