Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: components/sync/device_info/device_info_service.cc

Issue 2416823003: [Sync] Move some things from core/ to model(_impl)/. (Closed)
Patch Set: Rebase. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/sync/device_info/device_info_service.cc
diff --git a/components/sync/device_info/device_info_service.cc b/components/sync/device_info/device_info_service.cc
index d6d327dd4535dfcbc4be9ed096b8eb221c800401..7f0853ee35b69e74734320b42e2ddcaf06f263d1 100644
--- a/components/sync/device_info/device_info_service.cc
+++ b/components/sync/device_info/device_info_service.cc
@@ -13,10 +13,10 @@
#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "components/sync/base/time.h"
-#include "components/sync/core/data_batch_impl.h"
#include "components/sync/device_info/device_info_util.h"
#include "components/sync/model/entity_change.h"
#include "components/sync/model/metadata_batch.h"
+#include "components/sync/model/mutable_data_batch.h"
#include "components/sync/model/sync_error.h"
#include "components/sync/protocol/model_type_state.pb.h"
#include "components/sync/protocol/sync.pb.h"
@@ -151,7 +151,7 @@ SyncError DeviceInfoService::ApplySyncChanges(
void DeviceInfoService::GetData(StorageKeyList storage_keys,
DataCallback callback) {
- std::unique_ptr<DataBatchImpl> batch(new DataBatchImpl());
+ auto batch = base::MakeUnique<MutableDataBatch>();
for (const auto& key : storage_keys) {
const auto& iter = all_data_.find(key);
if (iter != all_data_.end()) {
@@ -163,7 +163,7 @@ void DeviceInfoService::GetData(StorageKeyList storage_keys,
}
void DeviceInfoService::GetAllData(DataCallback callback) {
- std::unique_ptr<DataBatchImpl> batch(new DataBatchImpl());
+ auto batch = base::MakeUnique<MutableDataBatch>();
for (const auto& kv : all_data_) {
batch->Put(kv.first, CopyToEntityData(*kv.second));
}
« no previous file with comments | « components/sync/device_info/device_info_service.h ('k') | components/sync/device_info/device_info_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698