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 #include "chrome/browser/extensions/extension_sync_bundle.h" | 5 #include "chrome/browser/extensions/extension_sync_bundle.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
9 #include "chrome/browser/extensions/extension_sorting.h" | 9 #include "chrome/browser/extensions/extension_sorting.h" |
10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
11 #include "chrome/common/extensions/extension_set.h" | 11 #include "chrome/common/extensions/extension_set.h" |
12 #include "chrome/common/extensions/sync_helper.h" | 12 #include "chrome/common/extensions/sync_helper.h" |
13 #include "sync/api/sync_change_processor.h" | 13 #include "sync/api/sync_change_processor.h" |
14 #include "sync/api/sync_error_factory.h" | 14 #include "sync/api/sync_error_factory.h" |
15 | 15 |
16 namespace extensions { | 16 namespace extensions { |
17 | 17 |
18 ExtensionSyncBundle::ExtensionSyncBundle(ExtensionService* extension_service) | 18 ExtensionSyncBundle::ExtensionSyncBundle(ExtensionService* extension_service) |
19 : extension_service_(extension_service), sync_processor_(NULL) {} | 19 : extension_service_(extension_service) {} |
20 | 20 |
21 ExtensionSyncBundle::~ExtensionSyncBundle() {} | 21 ExtensionSyncBundle::~ExtensionSyncBundle() {} |
22 | 22 |
23 void ExtensionSyncBundle::SetupSync( | 23 void ExtensionSyncBundle::SetupSync( |
24 syncer::SyncChangeProcessor* sync_processor, | 24 syncer::SyncChangeProcessor* sync_processor, |
25 syncer::SyncErrorFactory* sync_error_factory, | 25 syncer::SyncErrorFactory* sync_error_factory, |
26 const syncer::SyncDataList& initial_sync_data) { | 26 const syncer::SyncDataList& initial_sync_data) { |
27 sync_processor_.reset(sync_processor); | 27 sync_processor_.reset(sync_processor); |
28 sync_error_factory_.reset(sync_error_factory); | 28 sync_error_factory_.reset(sync_error_factory); |
29 | 29 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 void ExtensionSyncBundle::RemoveExtension(const std::string& id) { | 163 void ExtensionSyncBundle::RemoveExtension(const std::string& id) { |
164 synced_extensions_.erase(id); | 164 synced_extensions_.erase(id); |
165 } | 165 } |
166 | 166 |
167 void ExtensionSyncBundle::MarkPendingExtensionSynced(const std::string& id) { | 167 void ExtensionSyncBundle::MarkPendingExtensionSynced(const std::string& id) { |
168 pending_sync_data_.erase(id); | 168 pending_sync_data_.erase(id); |
169 synced_extensions_.insert(id); | 169 synced_extensions_.insert(id); |
170 } | 170 } |
171 | 171 |
172 } // namespace extensions | 172 } // namespace extensions |
OLD | NEW |