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

Side by Side Diff: components/history/core/browser/typed_url_sync_bridge.cc

Issue 2923363004: [Sync] Migrate bridge implementations to change list based MergeSyncData (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "components/history/core/browser/typed_url_sync_bridge.h" 5 #include "components/history/core/browser/typed_url_sync_bridge.h"
6 6
7 #include "base/big_endian.h" 7 #include "base/big_endian.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "components/history/core/browser/history_backend.h" 10 #include "components/history/core/browser/history_backend.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 std::unique_ptr<syncer::MetadataChangeList> 75 std::unique_ptr<syncer::MetadataChangeList>
76 TypedURLSyncBridge::CreateMetadataChangeList() { 76 TypedURLSyncBridge::CreateMetadataChangeList() {
77 DCHECK(sequence_checker_.CalledOnValidSequence()); 77 DCHECK(sequence_checker_.CalledOnValidSequence());
78 return base::MakeUnique<syncer::SyncMetadataStoreChangeList>( 78 return base::MakeUnique<syncer::SyncMetadataStoreChangeList>(
79 sync_metadata_database_, syncer::TYPED_URLS); 79 sync_metadata_database_, syncer::TYPED_URLS);
80 } 80 }
81 81
82 base::Optional<syncer::ModelError> TypedURLSyncBridge::MergeSyncData( 82 base::Optional<syncer::ModelError> TypedURLSyncBridge::MergeSyncData(
83 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list, 83 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
84 syncer::EntityDataMap entity_data_map) { 84 syncer::EntityChangeList entity_data) {
85 DCHECK(sequence_checker_.CalledOnValidSequence()); 85 DCHECK(sequence_checker_.CalledOnValidSequence());
86 NOTIMPLEMENTED(); 86 NOTIMPLEMENTED();
87 return {}; 87 return {};
88 } 88 }
89 89
90 base::Optional<syncer::ModelError> TypedURLSyncBridge::ApplySyncChanges( 90 base::Optional<syncer::ModelError> TypedURLSyncBridge::ApplySyncChanges(
91 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list, 91 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
92 syncer::EntityChangeList entity_changes) { 92 syncer::EntityChangeList entity_changes) {
93 DCHECK(sequence_checker_.CalledOnValidSequence()); 93 DCHECK(sequence_checker_.CalledOnValidSequence());
94 NOTIMPLEMENTED(); 94 NOTIMPLEMENTED();
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 if (!WriteToTypedUrlSpecifics(row, visits, specifics)) { 382 if (!WriteToTypedUrlSpecifics(row, visits, specifics)) {
383 // Cannot write to specifics, ex. no TYPED visits. 383 // Cannot write to specifics, ex. no TYPED visits.
384 return base::MakeUnique<EntityData>(); 384 return base::MakeUnique<EntityData>();
385 } 385 }
386 entity_data->non_unique_name = row.url().spec(); 386 entity_data->non_unique_name = row.url().spec();
387 387
388 return entity_data; 388 return entity_data;
389 } 389 }
390 390
391 } // namespace history 391 } // namespace history
OLDNEW
« no previous file with comments | « components/history/core/browser/typed_url_sync_bridge.h ('k') | components/reading_list/core/reading_list_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698