| 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 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "chrome/browser/extensions/app_sync_bundle.h" | 12 #include "chrome/browser/extensions/app_sync_bundle.h" |
| 13 #include "chrome/browser/extensions/extension_sync_bundle.h" | 13 #include "chrome/browser/extensions/extension_sync_bundle.h" |
| 14 #include "chrome/browser/extensions/pending_enables.h" | 14 #include "chrome/browser/extensions/pending_enables.h" |
| 15 #include "components/browser_context_keyed_service/browser_context_keyed_service
.h" | 15 #include "components/keyed_service/core/keyed_service.h" |
| 16 #include "extensions/browser/extension_prefs.h" | 16 #include "extensions/browser/extension_prefs.h" |
| 17 #include "extensions/common/extension.h" | 17 #include "extensions/common/extension.h" |
| 18 #include "sync/api/string_ordinal.h" | 18 #include "sync/api/string_ordinal.h" |
| 19 #include "sync/api/sync_change.h" | 19 #include "sync/api/sync_change.h" |
| 20 #include "sync/api/syncable_service.h" | 20 #include "sync/api/syncable_service.h" |
| 21 | 21 |
| 22 class ExtensionErrorUI; | 22 class ExtensionErrorUI; |
| 23 class ExtensionSyncData; | 23 class ExtensionSyncData; |
| 24 class Profile; | 24 class Profile; |
| 25 | 25 |
| 26 namespace base { | 26 namespace base { |
| 27 class SequencedTaskRunner; | 27 class SequencedTaskRunner; |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace extensions { | 30 namespace extensions { |
| 31 class AppSyncData; | 31 class AppSyncData; |
| 32 class ExtensionPrefs; | 32 class ExtensionPrefs; |
| 33 class ExtensionSyncData; | 33 class ExtensionSyncData; |
| 34 } // namespace extensions | 34 } // namespace extensions |
| 35 | 35 |
| 36 namespace syncer { | 36 namespace syncer { |
| 37 class SyncErrorFactory; | 37 class SyncErrorFactory; |
| 38 } | 38 } |
| 39 | 39 |
| 40 class ExtensionSyncService : public syncer::SyncableService, | 40 class ExtensionSyncService : public syncer::SyncableService, |
| 41 public BrowserContextKeyedService { | 41 public KeyedService { |
| 42 public: | 42 public: |
| 43 ExtensionSyncService(Profile* profile, | 43 ExtensionSyncService(Profile* profile, |
| 44 extensions::ExtensionPrefs* extension_prefs, | 44 extensions::ExtensionPrefs* extension_prefs, |
| 45 ExtensionService* extension_service); | 45 ExtensionService* extension_service); |
| 46 | 46 |
| 47 virtual ~ExtensionSyncService(); | 47 virtual ~ExtensionSyncService(); |
| 48 | 48 |
| 49 // Convenience function to get the ExtensionSyncService for a Profile. | 49 // Convenience function to get the ExtensionSyncService for a Profile. |
| 50 static ExtensionSyncService* Get(Profile* profile); | 50 static ExtensionSyncService* Get(Profile* profile); |
| 51 | 51 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 // Run()ning tells sync to try and start soon, because syncable changes | 149 // Run()ning tells sync to try and start soon, because syncable changes |
| 150 // have started happening. It will cause sync to call us back | 150 // have started happening. It will cause sync to call us back |
| 151 // asynchronously via MergeDataAndStartSyncing as soon as possible. | 151 // asynchronously via MergeDataAndStartSyncing as soon as possible. |
| 152 syncer::SyncableService::StartSyncFlare flare_; | 152 syncer::SyncableService::StartSyncFlare flare_; |
| 153 | 153 |
| 154 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncService); | 154 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncService); |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_SERVICE_H_ | 157 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_SERVICE_H_ |
| OLD | NEW |