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_EXTENSIONS_EXTENSION_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 // Convenience function to get the ExtensionSyncService for a BrowserContext. | 39 // Convenience function to get the ExtensionSyncService for a BrowserContext. |
40 static ExtensionSyncService* Get(content::BrowserContext* context); | 40 static ExtensionSyncService* Get(content::BrowserContext* context); |
41 | 41 |
42 // Notifies Sync (if needed) of a newly-installed extension or a change to | 42 // Notifies Sync (if needed) of a newly-installed extension or a change to |
43 // an existing extension. Call this when you change an extension setting that | 43 // an existing extension. Call this when you change an extension setting that |
44 // is synced as part of ExtensionSyncData (e.g. incognito_enabled or | 44 // is synced as part of ExtensionSyncData (e.g. incognito_enabled or |
45 // all_urls_enabled). | 45 // all_urls_enabled). |
46 void SyncExtensionChangeIfNeeded(const extensions::Extension& extension); | 46 void SyncExtensionChangeIfNeeded(const extensions::Extension& extension); |
47 | 47 |
| 48 // Returns whether the extension with the given |id| will be re-enabled once |
| 49 // it is updated to the given |version|. This happens when we get a Sync |
| 50 // update telling us to re-enable a newer version that what is currently |
| 51 // installed. |
| 52 bool HasPendingReenable(const std::string& id, |
| 53 const base::Version& version) const; |
| 54 |
48 // syncer::SyncableService implementation. | 55 // syncer::SyncableService implementation. |
49 syncer::SyncMergeResult MergeDataAndStartSyncing( | 56 syncer::SyncMergeResult MergeDataAndStartSyncing( |
50 syncer::ModelType type, | 57 syncer::ModelType type, |
51 const syncer::SyncDataList& initial_sync_data, | 58 const syncer::SyncDataList& initial_sync_data, |
52 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 59 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
53 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) override; | 60 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) override; |
54 void StopSyncing(syncer::ModelType type) override; | 61 void StopSyncing(syncer::ModelType type) override; |
55 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; | 62 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; |
56 syncer::SyncError ProcessSyncChanges( | 63 syncer::SyncError ProcessSyncChanges( |
57 const tracked_objects::Location& from_here, | 64 const tracked_objects::Location& from_here, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 137 |
131 // Run()ning tells sync to try and start soon, because syncable changes | 138 // Run()ning tells sync to try and start soon, because syncable changes |
132 // have started happening. It will cause sync to call us back | 139 // have started happening. It will cause sync to call us back |
133 // asynchronously via MergeDataAndStartSyncing as soon as possible. | 140 // asynchronously via MergeDataAndStartSyncing as soon as possible. |
134 syncer::SyncableService::StartSyncFlare flare_; | 141 syncer::SyncableService::StartSyncFlare flare_; |
135 | 142 |
136 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncService); | 143 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncService); |
137 }; | 144 }; |
138 | 145 |
139 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_SERVICE_H_ | 146 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_SERVICE_H_ |
OLD | NEW |