| 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_SYNC_BUNDLE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SYNC_BUNDLE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_SYNC_BUNDLE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SYNC_BUNDLE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // to the server. | 50 // to the server. |
| 51 void PushSyncDataList(const syncer::SyncDataList& sync_data_list); | 51 void PushSyncDataList(const syncer::SyncDataList& sync_data_list); |
| 52 | 52 |
| 53 // Handles the sync deletion of the given extension. This updates the set of | 53 // Handles the sync deletion of the given extension. This updates the set of |
| 54 // synced extensions as appropriate, and then pushes a SyncChange to the | 54 // synced extensions as appropriate, and then pushes a SyncChange to the |
| 55 // server. | 55 // server. |
| 56 void PushSyncDeletion(const std::string& extension_id, | 56 void PushSyncDeletion(const std::string& extension_id, |
| 57 const syncer::SyncData& sync_data); | 57 const syncer::SyncData& sync_data); |
| 58 | 58 |
| 59 // Pushes any sync changes to |extension| to the server. | 59 // Pushes any sync changes to |extension| to the server. |
| 60 void PushSyncChangeIfNeeded(const Extension& extension); | 60 void PushSyncAddOrUpdate(const Extension& extension); |
| 61 | 61 |
| 62 // Applies the given SyncChange coming from the server. | 62 // Applies the given SyncChange coming from the server. |
| 63 void ApplySyncChange(const syncer::SyncChange& sync_change); | 63 void ApplySyncChange(const syncer::SyncChange& sync_change); |
| 64 | 64 |
| 65 // Checks if the extension with the given |id| is pending to be synced. | 65 // Checks if the extension with the given |id| is pending to be synced. |
| 66 bool HasPendingExtensionId(const std::string& id) const; | 66 bool HasPendingExtensionId(const std::string& id) const; |
| 67 | 67 |
| 68 // Adds a pending extension to be synced. | 68 // Adds a pending extension to be synced. |
| 69 void AddPendingExtension(const std::string& id, | 69 void AddPendingExtension(const std::string& id, |
| 70 const ExtensionSyncData& sync_data); | 70 const ExtensionSyncData& sync_data); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 93 std::set<std::string> synced_extensions_; | 93 std::set<std::string> synced_extensions_; |
| 94 | 94 |
| 95 std::map<std::string, ExtensionSyncData> pending_sync_data_; | 95 std::map<std::string, ExtensionSyncData> pending_sync_data_; |
| 96 | 96 |
| 97 DISALLOW_COPY_AND_ASSIGN(SyncBundle); | 97 DISALLOW_COPY_AND_ASSIGN(SyncBundle); |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace extensions | 100 } // namespace extensions |
| 101 | 101 |
| 102 #endif // CHROME_BROWSER_EXTENSIONS_SYNC_BUNDLE_H_ | 102 #endif // CHROME_BROWSER_EXTENSIONS_SYNC_BUNDLE_H_ |
| OLD | NEW |