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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 // Returns a vector of all the pending sync data. | 73 // Returns a vector of all the pending sync data. |
74 std::vector<ExtensionSyncData> GetPendingData() const; | 74 std::vector<ExtensionSyncData> GetPendingData() const; |
75 | 75 |
76 // Appends sync data objects for every extension in |extensions|. | 76 // Appends sync data objects for every extension in |extensions|. |
77 void GetExtensionSyncDataListHelper( | 77 void GetExtensionSyncDataListHelper( |
78 const ExtensionSet& extensions, | 78 const ExtensionSet& extensions, |
79 std::vector<extensions::ExtensionSyncData>* sync_data_list) const; | 79 std::vector<extensions::ExtensionSyncData>* sync_data_list) const; |
80 | 80 |
81 // Overrides for SyncBundle. | 81 // Overrides for SyncBundle. |
82 // Returns true if SetupSync has been called, false otherwise. | 82 // Returns true if SetupSync has been called, false otherwise. |
83 virtual bool IsSyncing() const OVERRIDE; | 83 virtual bool IsSyncing() const override; |
84 | 84 |
85 // Sync a newly-installed extension or change an existing one. | 85 // Sync a newly-installed extension or change an existing one. |
86 virtual void SyncChangeIfNeeded(const Extension& extension) OVERRIDE; | 86 virtual void SyncChangeIfNeeded(const Extension& extension) override; |
87 | 87 |
88 private: | 88 private: |
89 // Add a synced extension. | 89 // Add a synced extension. |
90 void AddExtension(const std::string& id); | 90 void AddExtension(const std::string& id); |
91 | 91 |
92 // Remove a synced extension. | 92 // Remove a synced extension. |
93 void RemoveExtension(const std::string& id); | 93 void RemoveExtension(const std::string& id); |
94 | 94 |
95 // Change an extension from being pending to synced. | 95 // Change an extension from being pending to synced. |
96 void MarkPendingExtensionSynced(const std::string& id); | 96 void MarkPendingExtensionSynced(const std::string& id); |
97 | 97 |
98 ExtensionSyncService* extension_sync_service_; // Owns us. | 98 ExtensionSyncService* extension_sync_service_; // Owns us. |
99 scoped_ptr<syncer::SyncChangeProcessor> sync_processor_; | 99 scoped_ptr<syncer::SyncChangeProcessor> sync_processor_; |
100 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_; | 100 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_; |
101 | 101 |
102 std::set<std::string> synced_extensions_; | 102 std::set<std::string> synced_extensions_; |
103 std::map<std::string, ExtensionSyncData> pending_sync_data_; | 103 std::map<std::string, ExtensionSyncData> pending_sync_data_; |
104 | 104 |
105 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncBundle); | 105 DISALLOW_COPY_AND_ASSIGN(ExtensionSyncBundle); |
106 }; | 106 }; |
107 | 107 |
108 } // namespace extensions | 108 } // namespace extensions |
109 | 109 |
110 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_BUNDLE_H_ | 110 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYNC_BUNDLE_H_ |
OLD | NEW |