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

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

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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
« no previous file with comments | « components/sync/device_info/device_info_sync_bridge.h ('k') | components/sync/driver/fake_sync_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/device_info/device_info_sync_bridge.cc
diff --git a/components/sync/device_info/device_info_sync_bridge.cc b/components/sync/device_info/device_info_sync_bridge.cc
index a0f76d8e34493886a2fd102314a6c783834ba008..714b2d6d722c25e923b110790f959783ebc23267 100644
--- a/components/sync/device_info/device_info_sync_bridge.cc
+++ b/components/sync/device_info/device_info_sync_bridge.cc
@@ -368,33 +368,9 @@ void DeviceInfoSyncBridge::LoadMetadataIfReady() {
}
void DeviceInfoSyncBridge::OnReadAllMetadata(
- Result result,
- std::unique_ptr<RecordList> metadata_records,
- const std::string& global_metadata) {
- if (result != Result::SUCCESS) {
- ReportStartupErrorToSync("Load of metadata completely failed.");
- return;
- }
-
- auto batch = base::MakeUnique<MetadataBatch>();
- ModelTypeState state;
- if (state.ParseFromString(global_metadata)) {
- batch->SetModelTypeState(state);
- } else {
- ReportStartupErrorToSync("Failed to deserialize global metadata.");
- return;
- }
-
- for (const Record& r : *metadata_records.get()) {
- sync_pb::EntityMetadata entity_metadata;
- if (entity_metadata.ParseFromString(r.value)) {
- batch->AddMetadata(r.id, entity_metadata);
- } else {
- ReportStartupErrorToSync("Failed to deserialize entity metadata.");
- }
- }
-
- change_processor()->OnMetadataLoaded(SyncError(), std::move(batch));
+ SyncError error,
+ std::unique_ptr<MetadataBatch> metadata_batch) {
+ change_processor()->OnMetadataLoaded(error, std::move(metadata_batch));
ReconcileLocalAndStored();
}
« no previous file with comments | « components/sync/device_info/device_info_sync_bridge.h ('k') | components/sync/driver/fake_sync_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698