| OLD | NEW |
| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 const std::string& GetOemFolderNameForTest() const { | 85 const std::string& GetOemFolderNameForTest() const { |
| 86 return oem_folder_name_; | 86 return oem_folder_name_; |
| 87 } | 87 } |
| 88 void ResetDriveAppProviderForTest(); | 88 void ResetDriveAppProviderForTest(); |
| 89 | 89 |
| 90 // syncer::SyncableService | 90 // syncer::SyncableService |
| 91 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( | 91 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( |
| 92 syncer::ModelType type, | 92 syncer::ModelType type, |
| 93 const syncer::SyncDataList& initial_sync_data, | 93 const syncer::SyncDataList& initial_sync_data, |
| 94 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 94 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
| 95 scoped_ptr<syncer::SyncErrorFactory> error_handler) OVERRIDE; | 95 scoped_ptr<syncer::SyncErrorFactory> error_handler) override; |
| 96 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; | 96 virtual void StopSyncing(syncer::ModelType type) override; |
| 97 virtual syncer::SyncDataList GetAllSyncData( | 97 virtual syncer::SyncDataList GetAllSyncData( |
| 98 syncer::ModelType type) const OVERRIDE; | 98 syncer::ModelType type) const override; |
| 99 virtual syncer::SyncError ProcessSyncChanges( | 99 virtual syncer::SyncError ProcessSyncChanges( |
| 100 const tracked_objects::Location& from_here, | 100 const tracked_objects::Location& from_here, |
| 101 const syncer::SyncChangeList& change_list) OVERRIDE; | 101 const syncer::SyncChangeList& change_list) override; |
| 102 | 102 |
| 103 private: | 103 private: |
| 104 class ModelObserver; | 104 class ModelObserver; |
| 105 typedef std::map<std::string, SyncItem*> SyncItemMap; | 105 typedef std::map<std::string, SyncItem*> SyncItemMap; |
| 106 | 106 |
| 107 // KeyedService | 107 // KeyedService |
| 108 virtual void Shutdown() OVERRIDE; | 108 virtual void Shutdown() override; |
| 109 | 109 |
| 110 // content::NotificationObserver | 110 // content::NotificationObserver |
| 111 virtual void Observe(int type, | 111 virtual void Observe(int type, |
| 112 const content::NotificationSource& source, | 112 const content::NotificationSource& source, |
| 113 const content::NotificationDetails& details) OVERRIDE; | 113 const content::NotificationDetails& details) override; |
| 114 | 114 |
| 115 // Builds the model once ExtensionService is ready. | 115 // Builds the model once ExtensionService is ready. |
| 116 void BuildModel(); | 116 void BuildModel(); |
| 117 | 117 |
| 118 // Returns true if sync has restarted, otherwise runs |flare_|. | 118 // Returns true if sync has restarted, otherwise runs |flare_|. |
| 119 bool SyncStarted(); | 119 bool SyncStarted(); |
| 120 | 120 |
| 121 // If |app_item| matches an existing sync item, returns it. Otherwise adds | 121 // If |app_item| matches an existing sync item, returns it. Otherwise adds |
| 122 // |app_item| to |sync_items_| and returns the new item. If |app_item| is | 122 // |app_item| to |sync_items_| and returns the new item. If |app_item| is |
| 123 // invalid returns NULL. | 123 // invalid returns NULL. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 210 |
| 211 // Provides integration with Drive apps. | 211 // Provides integration with Drive apps. |
| 212 scoped_ptr<DriveAppProvider> drive_app_provider_; | 212 scoped_ptr<DriveAppProvider> drive_app_provider_; |
| 213 | 213 |
| 214 DISALLOW_COPY_AND_ASSIGN(AppListSyncableService); | 214 DISALLOW_COPY_AND_ASSIGN(AppListSyncableService); |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 } // namespace app_list | 217 } // namespace app_list |
| 218 | 218 |
| 219 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ | 219 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ |
| OLD | NEW |