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

Side by Side Diff: components/sync/syncable/base_node.cc

Issue 2889163002: Remove raw DictionaryValue::Set in //components (Closed)
Patch Set: Nits 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
« no previous file with comments | « components/sync/syncable/base_node.h ('k') | components/sync/syncable/entry.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/syncable/base_node.h" 5 #include "components/sync/syncable/base_node.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 211
212 int BaseNode::GetTotalNodeCount() const { 212 int BaseNode::GetTotalNodeCount() const {
213 return GetEntry()->GetTotalNodeCount(); 213 return GetEntry()->GetTotalNodeCount();
214 } 214 }
215 215
216 int BaseNode::GetPositionIndex() const { 216 int BaseNode::GetPositionIndex() const {
217 return GetEntry()->GetPositionIndex(); 217 return GetEntry()->GetPositionIndex();
218 } 218 }
219 219
220 base::DictionaryValue* BaseNode::ToValue() const { 220 std::unique_ptr<base::DictionaryValue> BaseNode::ToValue() const {
221 return GetEntry()->ToValue(GetTransaction()->GetCryptographer()); 221 return GetEntry()->ToValue(GetTransaction()->GetCryptographer());
222 } 222 }
223 223
224 int64_t BaseNode::GetExternalId() const { 224 int64_t BaseNode::GetExternalId() const {
225 return GetEntry()->GetLocalExternalId(); 225 return GetEntry()->GetLocalExternalId();
226 } 226 }
227 227
228 const syncable::Id& BaseNode::GetSyncId() const { 228 const syncable::Id& BaseNode::GetSyncId() const {
229 return GetEntry()->GetId(); 229 return GetEntry()->GetId();
230 } 230 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 const sync_pb::EntitySpecifics& specifics) { 276 const sync_pb::EntitySpecifics& specifics) {
277 ModelType type = GetModelTypeFromSpecifics(specifics); 277 ModelType type = GetModelTypeFromSpecifics(specifics);
278 DCHECK_NE(UNSPECIFIED, type); 278 DCHECK_NE(UNSPECIFIED, type);
279 if (GetModelType() != UNSPECIFIED) { 279 if (GetModelType() != UNSPECIFIED) {
280 DCHECK_EQ(GetModelType(), type); 280 DCHECK_EQ(GetModelType(), type);
281 } 281 }
282 unencrypted_data_.CopyFrom(specifics); 282 unencrypted_data_.CopyFrom(specifics);
283 } 283 }
284 284
285 } // namespace syncer 285 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/syncable/base_node.h ('k') | components/sync/syncable/entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698