OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSIONS_API_STORAGE_SYNC_STORAGE_BACKEND_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNC_STORAGE_BACKEND_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNC_STORAGE_BACKEND_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNC_STORAGE_BACKEND_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 syncer::ModelType sync_type, | 45 syncer::ModelType sync_type, |
46 const syncer::SyncableService::StartSyncFlare& flare); | 46 const syncer::SyncableService::StartSyncFlare& flare); |
47 | 47 |
48 virtual ~SyncStorageBackend(); | 48 virtual ~SyncStorageBackend(); |
49 | 49 |
50 virtual ValueStore* GetStorage(const std::string& extension_id); | 50 virtual ValueStore* GetStorage(const std::string& extension_id); |
51 virtual void DeleteStorage(const std::string& extension_id); | 51 virtual void DeleteStorage(const std::string& extension_id); |
52 | 52 |
53 // syncer::SyncableService implementation. | 53 // syncer::SyncableService implementation. |
54 virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) | 54 virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) |
55 const OVERRIDE; | 55 const override; |
56 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( | 56 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( |
57 syncer::ModelType type, | 57 syncer::ModelType type, |
58 const syncer::SyncDataList& initial_sync_data, | 58 const syncer::SyncDataList& initial_sync_data, |
59 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 59 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
60 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE; | 60 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) override; |
61 virtual syncer::SyncError ProcessSyncChanges( | 61 virtual syncer::SyncError ProcessSyncChanges( |
62 const tracked_objects::Location& from_here, | 62 const tracked_objects::Location& from_here, |
63 const syncer::SyncChangeList& change_list) OVERRIDE; | 63 const syncer::SyncChangeList& change_list) override; |
64 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; | 64 virtual void StopSyncing(syncer::ModelType type) override; |
65 | 65 |
66 private: | 66 private: |
67 // Gets a weak reference to the storage area for a given extension, | 67 // Gets a weak reference to the storage area for a given extension, |
68 // initializing sync with some initial data if sync enabled. | 68 // initializing sync with some initial data if sync enabled. |
69 SyncableSettingsStorage* GetOrCreateStorageWithSyncData( | 69 SyncableSettingsStorage* GetOrCreateStorageWithSyncData( |
70 const std::string& extension_id, | 70 const std::string& extension_id, |
71 const base::DictionaryValue& sync_data) const; | 71 const base::DictionaryValue& sync_data) const; |
72 | 72 |
73 // Gets all extension IDs known to extension settings. This may not be all | 73 // Gets all extension IDs known to extension settings. This may not be all |
74 // installed extensions. | 74 // installed extensions. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_; | 106 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_; |
107 | 107 |
108 syncer::SyncableService::StartSyncFlare flare_; | 108 syncer::SyncableService::StartSyncFlare flare_; |
109 | 109 |
110 DISALLOW_COPY_AND_ASSIGN(SyncStorageBackend); | 110 DISALLOW_COPY_AND_ASSIGN(SyncStorageBackend); |
111 }; | 111 }; |
112 | 112 |
113 } // namespace extensions | 113 } // namespace extensions |
114 | 114 |
115 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNC_STORAGE_BACKEND_H_ | 115 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNC_STORAGE_BACKEND_H_ |
OLD | NEW |