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

Side by Side Diff: chrome/browser/sync/engine/syncer.cc

Issue 7981006: [Sync] use base::Time in sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux compile errors Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/sync/engine/syncer.h" 5 #include "chrome/browser/sync/engine/syncer.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/sync/engine/apply_updates_command.h" 10 #include "chrome/browser/sync/engine/apply_updates_command.h"
11 #include "chrome/browser/sync/engine/build_and_process_conflict_sets_command.h" 11 #include "chrome/browser/sync/engine/build_and_process_conflict_sets_command.h"
12 #include "chrome/browser/sync/engine/build_commit_command.h" 12 #include "chrome/browser/sync/engine/build_commit_command.h"
13 #include "chrome/browser/sync/engine/cleanup_disabled_types_command.h" 13 #include "chrome/browser/sync/engine/cleanup_disabled_types_command.h"
14 #include "chrome/browser/sync/engine/clear_data_command.h" 14 #include "chrome/browser/sync/engine/clear_data_command.h"
15 #include "chrome/browser/sync/engine/conflict_resolver.h" 15 #include "chrome/browser/sync/engine/conflict_resolver.h"
16 #include "chrome/browser/sync/engine/download_updates_command.h" 16 #include "chrome/browser/sync/engine/download_updates_command.h"
17 #include "chrome/browser/sync/engine/get_commit_ids_command.h" 17 #include "chrome/browser/sync/engine/get_commit_ids_command.h"
18 #include "chrome/browser/sync/engine/net/server_connection_manager.h" 18 #include "chrome/browser/sync/engine/net/server_connection_manager.h"
19 #include "chrome/browser/sync/engine/post_commit_message_command.h" 19 #include "chrome/browser/sync/engine/post_commit_message_command.h"
20 #include "chrome/browser/sync/engine/process_commit_response_command.h" 20 #include "chrome/browser/sync/engine/process_commit_response_command.h"
21 #include "chrome/browser/sync/engine/process_updates_command.h" 21 #include "chrome/browser/sync/engine/process_updates_command.h"
22 #include "chrome/browser/sync/engine/resolve_conflicts_command.h" 22 #include "chrome/browser/sync/engine/resolve_conflicts_command.h"
23 #include "chrome/browser/sync/engine/store_timestamps_command.h" 23 #include "chrome/browser/sync/engine/store_timestamps_command.h"
24 #include "chrome/browser/sync/engine/syncer_end_command.h" 24 #include "chrome/browser/sync/engine/syncer_end_command.h"
25 #include "chrome/browser/sync/engine/syncer_types.h" 25 #include "chrome/browser/sync/engine/syncer_types.h"
26 #include "chrome/browser/sync/engine/syncer_util.h"
27 #include "chrome/browser/sync/engine/syncproto.h" 26 #include "chrome/browser/sync/engine/syncproto.h"
28 #include "chrome/browser/sync/engine/verify_updates_command.h" 27 #include "chrome/browser/sync/engine/verify_updates_command.h"
29 #include "chrome/browser/sync/syncable/directory_manager.h" 28 #include "chrome/browser/sync/syncable/directory_manager.h"
30 #include "chrome/browser/sync/syncable/syncable-inl.h" 29 #include "chrome/browser/sync/syncable/syncable-inl.h"
31 #include "chrome/browser/sync/syncable/syncable.h" 30 #include "chrome/browser/sync/syncable/syncable.h"
32 31
32 using base::Time;
33 using base::TimeDelta; 33 using base::TimeDelta;
34 using sync_pb::ClientCommand; 34 using sync_pb::ClientCommand;
35 using syncable::Blob; 35 using syncable::Blob;
36 using syncable::IS_UNAPPLIED_UPDATE; 36 using syncable::IS_UNAPPLIED_UPDATE;
37 using syncable::SERVER_CTIME; 37 using syncable::SERVER_CTIME;
38 using syncable::SERVER_IS_DEL; 38 using syncable::SERVER_IS_DEL;
39 using syncable::SERVER_IS_DIR; 39 using syncable::SERVER_IS_DIR;
40 using syncable::SERVER_MTIME; 40 using syncable::SERVER_MTIME;
41 using syncable::SERVER_NON_UNIQUE_NAME; 41 using syncable::SERVER_NON_UNIQUE_NAME;
42 using syncable::SERVER_PARENT_ID; 42 using syncable::SERVER_PARENT_ID;
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 dest->Put(SERVER_IS_DIR, src->Get(SERVER_IS_DIR)); 337 dest->Put(SERVER_IS_DIR, src->Get(SERVER_IS_DIR));
338 dest->Put(SERVER_IS_DEL, src->Get(SERVER_IS_DEL)); 338 dest->Put(SERVER_IS_DEL, src->Get(SERVER_IS_DEL));
339 dest->Put(IS_UNAPPLIED_UPDATE, src->Get(IS_UNAPPLIED_UPDATE)); 339 dest->Put(IS_UNAPPLIED_UPDATE, src->Get(IS_UNAPPLIED_UPDATE));
340 dest->Put(SERVER_SPECIFICS, src->Get(SERVER_SPECIFICS)); 340 dest->Put(SERVER_SPECIFICS, src->Get(SERVER_SPECIFICS));
341 dest->Put(SERVER_POSITION_IN_PARENT, src->Get(SERVER_POSITION_IN_PARENT)); 341 dest->Put(SERVER_POSITION_IN_PARENT, src->Get(SERVER_POSITION_IN_PARENT));
342 } 342 }
343 343
344 void ClearServerData(syncable::MutableEntry* entry) { 344 void ClearServerData(syncable::MutableEntry* entry) {
345 entry->Put(SERVER_NON_UNIQUE_NAME, ""); 345 entry->Put(SERVER_NON_UNIQUE_NAME, "");
346 entry->Put(SERVER_PARENT_ID, syncable::GetNullId()); 346 entry->Put(SERVER_PARENT_ID, syncable::GetNullId());
347 entry->Put(SERVER_MTIME, 0); 347 entry->Put(SERVER_MTIME, Time());
348 entry->Put(SERVER_CTIME, 0); 348 entry->Put(SERVER_CTIME, Time());
349 entry->Put(SERVER_VERSION, 0); 349 entry->Put(SERVER_VERSION, 0);
350 entry->Put(SERVER_IS_DIR, false); 350 entry->Put(SERVER_IS_DIR, false);
351 entry->Put(SERVER_IS_DEL, false); 351 entry->Put(SERVER_IS_DEL, false);
352 entry->Put(IS_UNAPPLIED_UPDATE, false); 352 entry->Put(IS_UNAPPLIED_UPDATE, false);
353 entry->Put(SERVER_SPECIFICS, sync_pb::EntitySpecifics::default_instance()); 353 entry->Put(SERVER_SPECIFICS, sync_pb::EntitySpecifics::default_instance());
354 entry->Put(SERVER_POSITION_IN_PARENT, 0); 354 entry->Put(SERVER_POSITION_IN_PARENT, 0);
355 } 355 }
356 356
357 } // namespace browser_sync 357 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/process_commit_response_command.cc ('k') | chrome/browser/sync/engine/syncer_proto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698