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

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

Issue 805633004: Enable Null Syncable ID which is different than Root ID. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback Created 6 years 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 | « sync/syncable/directory_unittest.cc ('k') | sync/syncable/mutable_entry.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 SYNC_SYNCABLE_ENTRY_KERNEL_H_ 5 #ifndef SYNC_SYNCABLE_ENTRY_KERNEL_H_
6 #define SYNC_SYNCABLE_ENTRY_KERNEL_H_ 6 #define SYNC_SYNCABLE_ENTRY_KERNEL_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 inline void put(Int64Field field, int64 value) { 240 inline void put(Int64Field field, int64 value) {
241 int64_fields[field - INT64_FIELDS_BEGIN] = value; 241 int64_fields[field - INT64_FIELDS_BEGIN] = value;
242 } 242 }
243 inline void put(TimeField field, const base::Time& value) { 243 inline void put(TimeField field, const base::Time& value) {
244 // Round-trip to proto time format and back so that we have 244 // Round-trip to proto time format and back so that we have
245 // consistent time resolutions (ms). 245 // consistent time resolutions (ms).
246 time_fields[field - TIME_FIELDS_BEGIN] = 246 time_fields[field - TIME_FIELDS_BEGIN] =
247 ProtoTimeToTime(TimeToProtoTime(value)); 247 ProtoTimeToTime(TimeToProtoTime(value));
248 } 248 }
249 inline void put(IdField field, const Id& value) { 249 inline void put(IdField field, const Id& value) {
250 DCHECK(!value.IsNull());
250 id_fields[field - ID_FIELDS_BEGIN] = value; 251 id_fields[field - ID_FIELDS_BEGIN] = value;
251 } 252 }
252 inline void put(BaseVersion field, int64 value) { 253 inline void put(BaseVersion field, int64 value) {
253 int64_fields[field - INT64_FIELDS_BEGIN] = value; 254 int64_fields[field - INT64_FIELDS_BEGIN] = value;
254 } 255 }
255 inline void put(IndexedBitField field, bool value) { 256 inline void put(IndexedBitField field, bool value) {
256 bit_fields[field - BIT_FIELDS_BEGIN] = value; 257 bit_fields[field - BIT_FIELDS_BEGIN] = value;
257 } 258 }
258 inline void put(IsDelField field, bool value) { 259 inline void put(IsDelField field, bool value) {
259 bit_fields[field - BIT_FIELDS_BEGIN] = value; 260 bit_fields[field - BIT_FIELDS_BEGIN] = value;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 const EntryKernelMutation& mutation); 381 const EntryKernelMutation& mutation);
381 382
382 // Caller owns the return value. 383 // Caller owns the return value.
383 base::ListValue* EntryKernelMutationMapToValue( 384 base::ListValue* EntryKernelMutationMapToValue(
384 const EntryKernelMutationMap& mutations); 385 const EntryKernelMutationMap& mutations);
385 386
386 } // namespace syncable 387 } // namespace syncable
387 } // namespace syncer 388 } // namespace syncer
388 389
389 #endif // SYNC_SYNCABLE_ENTRY_KERNEL_H_ 390 #endif // SYNC_SYNCABLE_ENTRY_KERNEL_H_
OLDNEW
« no previous file with comments | « sync/syncable/directory_unittest.cc ('k') | sync/syncable/mutable_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698