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

Side by Side Diff: components/sync/syncable/entry_kernel.h

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/entry.cc ('k') | components/sync/syncable/entry_kernel.cc » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_ 5 #ifndef COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_
6 #define COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_ 6 #define COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 attachment_metadata_fields[dest - ATTACHMENT_METADATA_FIELDS_BEGIN] = 365 attachment_metadata_fields[dest - ATTACHMENT_METADATA_FIELDS_BEGIN] =
366 attachment_metadata_fields[src - ATTACHMENT_METADATA_FIELDS_BEGIN]; 366 attachment_metadata_fields[src - ATTACHMENT_METADATA_FIELDS_BEGIN];
367 } 367 }
368 368
369 ModelType GetModelType() const; 369 ModelType GetModelType() const;
370 ModelType GetServerModelType() const; 370 ModelType GetServerModelType() const;
371 bool ShouldMaintainPosition() const; 371 bool ShouldMaintainPosition() const;
372 bool ShouldMaintainHierarchy() const; 372 bool ShouldMaintainHierarchy() const;
373 373
374 // Dumps all kernel info into a DictionaryValue and returns it. 374 // Dumps all kernel info into a DictionaryValue and returns it.
375 // Transfers ownership of the DictionaryValue to the caller.
376 // Note: |cryptographer| is an optional parameter for use in decrypting 375 // Note: |cryptographer| is an optional parameter for use in decrypting
377 // encrypted specifics. If it is null or the specifics are not decryptsble, 376 // encrypted specifics. If it is null or the specifics are not decryptsble,
378 // they will be serialized as empty proto's. 377 // they will be serialized as empty proto's.
379 base::DictionaryValue* ToValue(Cryptographer* cryptographer) const; 378 std::unique_ptr<base::DictionaryValue> ToValue(
379 Cryptographer* cryptographer) const;
380 380
381 size_t EstimateMemoryUsage() const; 381 size_t EstimateMemoryUsage() const;
382 382
383 private: 383 private:
384 // Tracks whether this entry needs to be saved to the database. 384 // Tracks whether this entry needs to be saved to the database.
385 bool dirty_; 385 bool dirty_;
386 mutable size_t memory_usage_; 386 mutable size_t memory_usage_;
387 constexpr static size_t kMemoryUsageUnknown = size_t(-1); 387 constexpr static size_t kMemoryUsageUnknown = size_t(-1);
388 }; 388 };
389 389
(...skipping 26 matching lines...) Expand all
416 416
417 std::unique_ptr<base::ListValue> EntryKernelMutationMapToValue( 417 std::unique_ptr<base::ListValue> EntryKernelMutationMapToValue(
418 const EntryKernelMutationMap& mutations); 418 const EntryKernelMutationMap& mutations);
419 419
420 std::ostream& operator<<(std::ostream& os, const EntryKernel& entry_kernel); 420 std::ostream& operator<<(std::ostream& os, const EntryKernel& entry_kernel);
421 421
422 } // namespace syncable 422 } // namespace syncable
423 } // namespace syncer 423 } // namespace syncer
424 424
425 #endif // COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_ 425 #endif // COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_
OLDNEW
« no previous file with comments | « components/sync/syncable/entry.cc ('k') | components/sync/syncable/entry_kernel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698