| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BUNDLE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_BUNDLE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_BUNDLE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_BUNDLE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "chrome/browser/extensions/extension_sync_data.h" | 16 #include "chrome/browser/extensions/extension_sync_data.h" |
| 17 #include "chrome/browser/sync/api/syncable_service.h" | 17 #include "chrome/browser/sync/api/syncable_service.h" |
| 18 | 18 |
| 19 class SyncChangeProcessor; | 19 class SyncChangeProcessor; |
| 20 class Extension; | |
| 21 class ExtensionService; | 20 class ExtensionService; |
| 22 class ExtensionSet; | 21 class ExtensionSet; |
| 23 class SyncErrorFactory; | 22 class SyncErrorFactory; |
| 24 | 23 |
| 25 namespace extensions { | 24 namespace extensions { |
| 26 | 25 |
| 26 class Extension; |
| 27 |
| 27 // Bundle of extension specific sync stuff. | 28 // Bundle of extension specific sync stuff. |
| 28 class ExtensionSyncBundle { | 29 class ExtensionSyncBundle { |
| 29 public: | 30 public: |
| 30 explicit ExtensionSyncBundle(ExtensionService* extension_service); | 31 explicit ExtensionSyncBundle(ExtensionService* extension_service); |
| 31 ~ExtensionSyncBundle(); | 32 ~ExtensionSyncBundle(); |
| 32 | 33 |
| 33 // Setup this bundle to be sync extension data. | 34 // Setup this bundle to be sync extension data. |
| 34 void SetupSync(SyncChangeProcessor* sync_processor, | 35 void SetupSync(SyncChangeProcessor* sync_processor, |
| 35 SyncErrorFactory* sync_error_factory, | 36 SyncErrorFactory* sync_error_factory, |
| 36 const SyncDataList& initial_sync_data); | 37 const SyncDataList& initial_sync_data); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 96 |
| 96 std::set<std::string> synced_extensions_; | 97 std::set<std::string> synced_extensions_; |
| 97 std::map<std::string, ExtensionSyncData> pending_sync_data_; | 98 std::map<std::string, ExtensionSyncData> pending_sync_data_; |
| 98 | 99 |
| 99 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncBundle); | 100 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncBundle); |
| 100 }; | 101 }; |
| 101 | 102 |
| 102 } // namespace extensions | 103 } // namespace extensions |
| 103 | 104 |
| 104 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_BUNDLE_H_ | 105 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_BUNDLE_H_ |
| OLD | NEW |