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

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

Issue 2427803002: [Sync] Replacing NULL with nullptr in code and null in comments for components/sync/ (Closed)
Patch Set: Fixing start of sentence capitlization. Created 4 years, 2 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.h ('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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 UNIQUE_BOOKMARK_TAG, // Client tags for bookmark items 133 UNIQUE_BOOKMARK_TAG, // Client tags for bookmark items
134 STRING_FIELDS_END, 134 STRING_FIELDS_END,
135 }; 135 };
136 136
137 enum { 137 enum {
138 STRING_FIELDS_COUNT = STRING_FIELDS_END - STRING_FIELDS_BEGIN, 138 STRING_FIELDS_COUNT = STRING_FIELDS_END - STRING_FIELDS_BEGIN,
139 PROTO_FIELDS_BEGIN = STRING_FIELDS_END 139 PROTO_FIELDS_BEGIN = STRING_FIELDS_END
140 }; 140 };
141 141
142 // From looking at the sqlite3 docs, it's not directly stated, but it 142 // From looking at the sqlite3 docs, it's not directly stated, but it
143 // seems the overhead for storing a NULL blob is very small. 143 // seems the overhead for storing a null blob is very small.
144 enum ProtoField { 144 enum ProtoField {
145 SPECIFICS = PROTO_FIELDS_BEGIN, 145 SPECIFICS = PROTO_FIELDS_BEGIN,
146 SERVER_SPECIFICS, 146 SERVER_SPECIFICS,
147 BASE_SERVER_SPECIFICS, 147 BASE_SERVER_SPECIFICS,
148 PROTO_FIELDS_END, 148 PROTO_FIELDS_END,
149 }; 149 };
150 150
151 enum { 151 enum {
152 PROTO_FIELDS_COUNT = PROTO_FIELDS_END - PROTO_FIELDS_BEGIN, 152 PROTO_FIELDS_COUNT = PROTO_FIELDS_END - PROTO_FIELDS_BEGIN,
153 UNIQUE_POSITION_FIELDS_BEGIN = PROTO_FIELDS_END 153 UNIQUE_POSITION_FIELDS_BEGIN = PROTO_FIELDS_END
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 } 366 }
367 367
368 ModelType GetModelType() const; 368 ModelType GetModelType() const;
369 ModelType GetServerModelType() const; 369 ModelType GetServerModelType() const;
370 bool ShouldMaintainPosition() const; 370 bool ShouldMaintainPosition() const;
371 bool ShouldMaintainHierarchy() const; 371 bool ShouldMaintainHierarchy() const;
372 372
373 // Dumps all kernel info into a DictionaryValue and returns it. 373 // Dumps all kernel info into a DictionaryValue and returns it.
374 // Transfers ownership of the DictionaryValue to the caller. 374 // Transfers ownership of the DictionaryValue to the caller.
375 // Note: |cryptographer| is an optional parameter for use in decrypting 375 // Note: |cryptographer| is an optional parameter for use in decrypting
376 // 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,
377 // they will be serialized as empty proto's. 377 // they will be serialized as empty proto's.
378 base::DictionaryValue* ToValue(Cryptographer* cryptographer) const; 378 base::DictionaryValue* ToValue(Cryptographer* cryptographer) const;
379 379
380 private: 380 private:
381 // Tracks whether this entry needs to be saved to the database. 381 // Tracks whether this entry needs to be saved to the database.
382 bool dirty_; 382 bool dirty_;
383 }; 383 };
384 384
385 template <typename T> 385 template <typename T>
386 class EntryKernelLessByMetaHandle { 386 class EntryKernelLessByMetaHandle {
(...skipping 25 matching lines...) Expand all
412 412
413 std::unique_ptr<base::ListValue> EntryKernelMutationMapToValue( 413 std::unique_ptr<base::ListValue> EntryKernelMutationMapToValue(
414 const EntryKernelMutationMap& mutations); 414 const EntryKernelMutationMap& mutations);
415 415
416 std::ostream& operator<<(std::ostream& os, const EntryKernel& entry_kernel); 416 std::ostream& operator<<(std::ostream& os, const EntryKernel& entry_kernel);
417 417
418 } // namespace syncable 418 } // namespace syncable
419 } // namespace syncer 419 } // namespace syncer
420 420
421 #endif // COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_ 421 #endif // COMPONENTS_SYNC_SYNCABLE_ENTRY_KERNEL_H_
OLDNEW
« no previous file with comments | « components/sync/syncable/entry.h ('k') | components/sync/syncable/entry_kernel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698