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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 syncer::SyncError ProcessSyncChanges( | 60 syncer::SyncError ProcessSyncChanges( |
61 const tracked_objects::Location& from_here, | 61 const tracked_objects::Location& from_here, |
62 const syncer::SyncChangeList& change_list) override; | 62 const syncer::SyncChangeList& change_list) override; |
63 void StopSyncing(syncer::ModelType type) override; | 63 void StopSyncing(syncer::ModelType type) override; |
64 | 64 |
65 private: | 65 private: |
66 // Gets a weak reference to the storage area for a given extension, | 66 // Gets a weak reference to the storage area for a given extension, |
67 // initializing sync with some initial data if sync enabled. | 67 // initializing sync with some initial data if sync enabled. |
68 SyncableSettingsStorage* GetOrCreateStorageWithSyncData( | 68 SyncableSettingsStorage* GetOrCreateStorageWithSyncData( |
69 const std::string& extension_id, | 69 const std::string& extension_id, |
70 const base::DictionaryValue& sync_data) const; | 70 scoped_ptr<base::DictionaryValue> sync_data) const; |
71 | 71 |
72 // Gets all extension IDs known to extension settings. This may not be all | 72 // Gets all extension IDs known to extension settings. This may not be all |
73 // installed extensions. | 73 // installed extensions. |
74 std::set<std::string> GetKnownExtensionIDs() const; | 74 std::set<std::string> GetKnownExtensionIDs() const; |
75 | 75 |
76 // Creates a new SettingsSyncProcessor for an extension. | 76 // Creates a new SettingsSyncProcessor for an extension. |
77 scoped_ptr<SettingsSyncProcessor> CreateSettingsSyncProcessor( | 77 scoped_ptr<SettingsSyncProcessor> CreateSettingsSyncProcessor( |
78 const std::string& extension_id) const; | 78 const std::string& extension_id) const; |
79 | 79 |
80 // The Factory to use for creating new ValueStores. | 80 // The Factory to use for creating new ValueStores. |
(...skipping 24 matching lines...) Expand all Loading... |
105 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_; | 105 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_; |
106 | 106 |
107 syncer::SyncableService::StartSyncFlare flare_; | 107 syncer::SyncableService::StartSyncFlare flare_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(SyncStorageBackend); | 109 DISALLOW_COPY_AND_ASSIGN(SyncStorageBackend); |
110 }; | 110 }; |
111 | 111 |
112 } // namespace extensions | 112 } // namespace extensions |
113 | 113 |
114 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNC_STORAGE_BACKEND_H_ | 114 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SYNC_STORAGE_BACKEND_H_ |
OLD | NEW |