| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 Profile* profile() { return profile_; } | 121 Profile* profile() { return profile_; } |
| 122 size_t GetNumSyncItemsForTest(); | 122 size_t GetNumSyncItemsForTest(); |
| 123 const std::string& GetOemFolderNameForTest() const { | 123 const std::string& GetOemFolderNameForTest() const { |
| 124 return oem_folder_name_; | 124 return oem_folder_name_; |
| 125 } | 125 } |
| 126 void ResetDriveAppProviderForTest(); | 126 void ResetDriveAppProviderForTest(); |
| 127 | 127 |
| 128 const SyncItemMap& sync_items() const { return sync_items_; } | 128 const SyncItemMap& sync_items() const { return sync_items_; } |
| 129 | 129 |
| 130 // Returns true if sync is currently active. |
| 131 bool is_active() const { return sync_processor_ != nullptr; } |
| 132 |
| 130 // syncer::SyncableService | 133 // syncer::SyncableService |
| 131 syncer::SyncMergeResult MergeDataAndStartSyncing( | 134 syncer::SyncMergeResult MergeDataAndStartSyncing( |
| 132 syncer::ModelType type, | 135 syncer::ModelType type, |
| 133 const syncer::SyncDataList& initial_sync_data, | 136 const syncer::SyncDataList& initial_sync_data, |
| 134 std::unique_ptr<syncer::SyncChangeProcessor> sync_processor, | 137 std::unique_ptr<syncer::SyncChangeProcessor> sync_processor, |
| 135 std::unique_ptr<syncer::SyncErrorFactory> error_handler) override; | 138 std::unique_ptr<syncer::SyncErrorFactory> error_handler) override; |
| 136 void StopSyncing(syncer::ModelType type) override; | 139 void StopSyncing(syncer::ModelType type) override; |
| 137 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; | 140 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; |
| 138 syncer::SyncError ProcessSyncChanges( | 141 syncer::SyncError ProcessSyncChanges( |
| 139 const tracked_objects::Location& from_here, | 142 const tracked_objects::Location& from_here, |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 | 258 |
| 256 // Provides integration with Drive apps. | 259 // Provides integration with Drive apps. |
| 257 std::unique_ptr<DriveAppProvider> drive_app_provider_; | 260 std::unique_ptr<DriveAppProvider> drive_app_provider_; |
| 258 | 261 |
| 259 DISALLOW_COPY_AND_ASSIGN(AppListSyncableService); | 262 DISALLOW_COPY_AND_ASSIGN(AppListSyncableService); |
| 260 }; | 263 }; |
| 261 | 264 |
| 262 } // namespace app_list | 265 } // namespace app_list |
| 263 | 266 |
| 264 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ | 267 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_SYNCABLE_SERVICE_H_ |
| OLD | NEW |