| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 void SyncEnableExtension(const extensions::Extension& extension); | 106 void SyncEnableExtension(const extensions::Extension& extension); |
| 107 void SyncDisableExtension(const extensions::Extension& extension); | 107 void SyncDisableExtension(const extensions::Extension& extension); |
| 108 | 108 |
| 109 void SyncOrderingChange(const std::string& extension_id); | 109 void SyncOrderingChange(const std::string& extension_id); |
| 110 | 110 |
| 111 // |flare| provides a StartSyncFlare to the SyncableService. See | 111 // |flare| provides a StartSyncFlare to the SyncableService. See |
| 112 // sync_start_util for more. | 112 // sync_start_util for more. |
| 113 void SetSyncStartFlare(const syncer::SyncableService::StartSyncFlare& flare); | 113 void SetSyncStartFlare(const syncer::SyncableService::StartSyncFlare& flare); |
| 114 | 114 |
| 115 Profile* profile() { return profile_; } |
| 116 |
| 115 private: | 117 private: |
| 116 // Return true if the sync type of |extension| matches |type|. | 118 // Return true if the sync type of |extension| matches |type|. |
| 117 bool IsCorrectSyncType(const extensions::Extension& extension, | 119 bool IsCorrectSyncType(const extensions::Extension& extension, |
| 118 syncer::ModelType type) | 120 syncer::ModelType type) |
| 119 const; | 121 const; |
| 120 | 122 |
| 121 // Whether the given extension has been enabled before sync has started. | 123 // Whether the given extension has been enabled before sync has started. |
| 122 bool IsPendingEnable(const std::string& extension_id) const; | 124 bool IsPendingEnable(const std::string& extension_id) const; |
| 123 | 125 |
| 124 // Handles setting the extension specific values in |extension_sync_data| to | 126 // Handles setting the extension specific values in |extension_sync_data| to |
| (...skipping 24 matching lines...) Expand all Loading... |
| 149 | 151 |
| 150 // Run()ning tells sync to try and start soon, because syncable changes | 152 // Run()ning tells sync to try and start soon, because syncable changes |
| 151 // have started happening. It will cause sync to call us back | 153 // have started happening. It will cause sync to call us back |
| 152 // asynchronously via MergeDataAndStartSyncing as soon as possible. | 154 // asynchronously via MergeDataAndStartSyncing as soon as possible. |
| 153 syncer::SyncableService::StartSyncFlare flare_; | 155 syncer::SyncableService::StartSyncFlare flare_; |
| 154 | 156 |
| 155 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncService); | 157 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncService); |
| 156 }; | 158 }; |
| 157 | 159 |
| 158 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_SERVICE_H_ | 160 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_SERVICE_H_ |
| OLD | NEW |