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

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

Issue 308003005: app_list: Drive app integration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 | Annotate | Revision Log
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"
11 #include "chrome/browser/sync/glue/sync_start_util.h" 11 #include "chrome/browser/sync/glue/sync_start_util.h"
12 #include "components/keyed_service/core/keyed_service.h" 12 #include "components/keyed_service/core/keyed_service.h"
13 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
15 #include "sync/api/string_ordinal.h" 15 #include "sync/api/string_ordinal.h"
16 #include "sync/api/sync_change.h" 16 #include "sync/api/sync_change.h"
17 #include "sync/api/sync_change_processor.h" 17 #include "sync/api/sync_change_processor.h"
18 #include "sync/api/sync_error_factory.h" 18 #include "sync/api/sync_error_factory.h"
19 #include "sync/api/syncable_service.h" 19 #include "sync/api/syncable_service.h"
20 #include "sync/protocol/app_list_specifics.pb.h" 20 #include "sync/protocol/app_list_specifics.pb.h"
21 21
22 class DriveAppProvider;
22 class ExtensionAppModelBuilder; 23 class ExtensionAppModelBuilder;
23 class Profile; 24 class Profile;
24 25
25 namespace extensions { 26 namespace extensions {
26 class ExtensionSystem; 27 class ExtensionSystem;
27 } 28 }
28 29
29 namespace sync_pb { 30 namespace sync_pb {
30 class AppListSpecifics; 31 class AppListSpecifics;
31 } 32 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 virtual syncer::SyncDataList GetAllSyncData( 95 virtual syncer::SyncDataList GetAllSyncData(
95 syncer::ModelType type) const OVERRIDE; 96 syncer::ModelType type) const OVERRIDE;
96 virtual syncer::SyncError ProcessSyncChanges( 97 virtual syncer::SyncError ProcessSyncChanges(
97 const tracked_objects::Location& from_here, 98 const tracked_objects::Location& from_here,
98 const syncer::SyncChangeList& change_list) OVERRIDE; 99 const syncer::SyncChangeList& change_list) OVERRIDE;
99 100
100 private: 101 private:
101 class ModelObserver; 102 class ModelObserver;
102 typedef std::map<std::string, SyncItem*> SyncItemMap; 103 typedef std::map<std::string, SyncItem*> SyncItemMap;
103 104
105 // KeyedService
106 virtual void Shutdown() OVERRIDE;
107
104 // content::NotificationObserver 108 // content::NotificationObserver
105 virtual void Observe(int type, 109 virtual void Observe(int type,
106 const content::NotificationSource& source, 110 const content::NotificationSource& source,
107 const content::NotificationDetails& details) OVERRIDE; 111 const content::NotificationDetails& details) OVERRIDE;
108 112
109 // Builds the model once ExtensionService is ready. 113 // Builds the model once ExtensionService is ready.
110 void BuildModel(); 114 void BuildModel();
111 115
112 // Returns true if sync has restarted, otherwise runs |flare_|. 116 // Returns true if sync has restarted, otherwise runs |flare_|.
113 bool SyncStarted(); 117 bool SyncStarted();
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 content::NotificationRegistrar registrar_; 193 content::NotificationRegistrar registrar_;
190 scoped_ptr<AppListModel> model_; 194 scoped_ptr<AppListModel> model_;
191 scoped_ptr<ModelObserver> model_observer_; 195 scoped_ptr<ModelObserver> model_observer_;
192 scoped_ptr<ExtensionAppModelBuilder> apps_builder_; 196 scoped_ptr<ExtensionAppModelBuilder> apps_builder_;
193 scoped_ptr<syncer::SyncChangeProcessor> sync_processor_; 197 scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
194 scoped_ptr<syncer::SyncErrorFactory> sync_error_handler_; 198 scoped_ptr<syncer::SyncErrorFactory> sync_error_handler_;
195 SyncItemMap sync_items_; 199 SyncItemMap sync_items_;
196 syncer::SyncableService::StartSyncFlare flare_; 200 syncer::SyncableService::StartSyncFlare flare_;
197 std::string oem_folder_name_; 201 std::string oem_folder_name_;
198 202
203 // Provides integration with Drive apps.
204 scoped_ptr<DriveAppProvider> drive_app_provider_;
205
199 DISALLOW_COPY_AND_ASSIGN(AppListSyncableService); 206 DISALLOW_COPY_AND_ASSIGN(AppListSyncableService);
200 }; 207 };
201 208
202 } // namespace app_list 209 } // namespace app_list
203 210
204 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ 211 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.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