OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/sync_bundle.h" | 5 #include "chrome/browser/extensions/sync_bundle.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "chrome/browser/extensions/extension_sync_data.h" | 8 #include "chrome/browser/extensions/extension_sync_data.h" |
9 #include "chrome/browser/extensions/extension_sync_service.h" | 9 #include "chrome/browser/extensions/extension_sync_service.h" |
10 #include "chrome/browser/extensions/extension_util.h" | 10 #include "chrome/browser/extensions/extension_util.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "extensions/common/extension.h" | 12 #include "extensions/common/extension.h" |
13 | 13 |
14 namespace extensions { | 14 namespace extensions { |
15 | 15 |
16 SyncBundle::SyncBundle() {} | 16 SyncBundle::SyncBundle() {} |
17 SyncBundle::~SyncBundle() {} | 17 SyncBundle::~SyncBundle() {} |
18 | 18 |
19 void SyncBundle::StartSyncing( | 19 void SyncBundle::StartSyncing( |
20 scoped_ptr<syncer::SyncChangeProcessor> sync_processor) { | 20 std::unique_ptr<syncer::SyncChangeProcessor> sync_processor) { |
21 sync_processor_.reset(sync_processor.release()); | 21 sync_processor_.reset(sync_processor.release()); |
22 } | 22 } |
23 | 23 |
24 void SyncBundle::Reset() { | 24 void SyncBundle::Reset() { |
25 sync_processor_.reset(); | 25 sync_processor_.reset(); |
26 synced_extensions_.clear(); | 26 synced_extensions_.clear(); |
27 pending_sync_data_.clear(); | 27 pending_sync_data_.clear(); |
28 } | 28 } |
29 | 29 |
30 bool SyncBundle::IsSyncing() const { | 30 bool SyncBundle::IsSyncing() const { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 void SyncBundle::RemoveSyncedExtension(const std::string& id) { | 115 void SyncBundle::RemoveSyncedExtension(const std::string& id) { |
116 synced_extensions_.erase(id); | 116 synced_extensions_.erase(id); |
117 } | 117 } |
118 | 118 |
119 bool SyncBundle::HasSyncedExtension(const std::string& id) const { | 119 bool SyncBundle::HasSyncedExtension(const std::string& id) const { |
120 return synced_extensions_.find(id) != synced_extensions_.end(); | 120 return synced_extensions_.find(id) != synced_extensions_.end(); |
121 } | 121 } |
122 | 122 |
123 } // namespace extensions | 123 } // namespace extensions |
OLD | NEW |