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

Side by Side Diff: components/sync/model_impl/in_memory_metadata_change_list.cc

Issue 2794413002: [USS] Add SyncMetadataStore interface (Closed)
Patch Set: Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/sync/model_impl/in_memory_metadata_change_list.h" 5 #include "components/sync/model_impl/in_memory_metadata_change_list.h"
6 6
7 namespace syncer { 7 namespace syncer {
8 8
9 InMemoryMetadataChangeList::InMemoryMetadataChangeList() {} 9 InMemoryMetadataChangeList::InMemoryMetadataChangeList() {}
10 InMemoryMetadataChangeList::~InMemoryMetadataChangeList() {} 10 InMemoryMetadataChangeList::~InMemoryMetadataChangeList() {}
(...skipping 10 matching lines...) Expand all
21 void InMemoryMetadataChangeList::UpdateMetadata( 21 void InMemoryMetadataChangeList::UpdateMetadata(
22 const std::string& storage_key, 22 const std::string& storage_key,
23 const sync_pb::EntityMetadata& metadata) { 23 const sync_pb::EntityMetadata& metadata) {
24 metadata_changes_[storage_key] = {UPDATE, metadata}; 24 metadata_changes_[storage_key] = {UPDATE, metadata};
25 } 25 }
26 26
27 void InMemoryMetadataChangeList::ClearMetadata(const std::string& storage_key) { 27 void InMemoryMetadataChangeList::ClearMetadata(const std::string& storage_key) {
28 metadata_changes_[storage_key] = {CLEAR, sync_pb::EntityMetadata()}; 28 metadata_changes_[storage_key] = {CLEAR, sync_pb::EntityMetadata()};
29 } 29 }
30 30
31 base::Optional<ModelError> InMemoryMetadataChangeList::TakeError() {
32 NOTREACHED();
pavely 2017/04/06 22:56:42 I don't think we should assert NOTREACHED() here.
Gang Wu 2017/04/21 05:28:03 Done.
33 return {};
34 }
35
31 } // namespace syncer 36 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698