| OLD | NEW |
| 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 "sync/engine/syncer.h" | 5 #include "sync/engine/syncer.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "sync/engine/syncer_types.h" | 24 #include "sync/engine/syncer_types.h" |
| 25 #include "sync/engine/syncproto.h" | 25 #include "sync/engine/syncproto.h" |
| 26 #include "sync/engine/throttled_data_type_tracker.h" | 26 #include "sync/engine/throttled_data_type_tracker.h" |
| 27 #include "sync/engine/verify_updates_command.h" | 27 #include "sync/engine/verify_updates_command.h" |
| 28 #include "sync/syncable/mutable_entry.h" | 28 #include "sync/syncable/mutable_entry.h" |
| 29 #include "sync/syncable/syncable-inl.h" | 29 #include "sync/syncable/syncable-inl.h" |
| 30 | 30 |
| 31 using base::Time; | 31 using base::Time; |
| 32 using base::TimeDelta; | 32 using base::TimeDelta; |
| 33 using sync_pb::ClientCommand; | 33 using sync_pb::ClientCommand; |
| 34 |
| 35 namespace syncer { |
| 36 |
| 37 using sessions::ScopedSessionContextConflictResolver; |
| 38 using sessions::StatusController; |
| 39 using sessions::SyncSession; |
| 40 using sessions::ConflictProgress; |
| 34 using syncable::IS_UNAPPLIED_UPDATE; | 41 using syncable::IS_UNAPPLIED_UPDATE; |
| 35 using syncable::SERVER_CTIME; | 42 using syncable::SERVER_CTIME; |
| 36 using syncable::SERVER_IS_DEL; | 43 using syncable::SERVER_IS_DEL; |
| 37 using syncable::SERVER_IS_DIR; | 44 using syncable::SERVER_IS_DIR; |
| 38 using syncable::SERVER_MTIME; | 45 using syncable::SERVER_MTIME; |
| 39 using syncable::SERVER_NON_UNIQUE_NAME; | 46 using syncable::SERVER_NON_UNIQUE_NAME; |
| 40 using syncable::SERVER_PARENT_ID; | 47 using syncable::SERVER_PARENT_ID; |
| 41 using syncable::SERVER_POSITION_IN_PARENT; | 48 using syncable::SERVER_POSITION_IN_PARENT; |
| 42 using syncable::SERVER_SPECIFICS; | 49 using syncable::SERVER_SPECIFICS; |
| 43 using syncable::SERVER_VERSION; | 50 using syncable::SERVER_VERSION; |
| 44 | 51 |
| 45 namespace syncer { | |
| 46 | |
| 47 using sessions::ScopedSessionContextConflictResolver; | |
| 48 using sessions::StatusController; | |
| 49 using sessions::SyncSession; | |
| 50 using sessions::ConflictProgress; | |
| 51 | |
| 52 #define ENUM_CASE(x) case x: return #x | 52 #define ENUM_CASE(x) case x: return #x |
| 53 const char* SyncerStepToString(const SyncerStep step) | 53 const char* SyncerStepToString(const SyncerStep step) |
| 54 { | 54 { |
| 55 switch (step) { | 55 switch (step) { |
| 56 ENUM_CASE(SYNCER_BEGIN); | 56 ENUM_CASE(SYNCER_BEGIN); |
| 57 ENUM_CASE(CLEANUP_DISABLED_TYPES); | 57 ENUM_CASE(CLEANUP_DISABLED_TYPES); |
| 58 ENUM_CASE(DOWNLOAD_UPDATES); | 58 ENUM_CASE(DOWNLOAD_UPDATES); |
| 59 ENUM_CASE(PROCESS_CLIENT_COMMAND); | 59 ENUM_CASE(PROCESS_CLIENT_COMMAND); |
| 60 ENUM_CASE(VERIFY_UPDATES); | 60 ENUM_CASE(VERIFY_UPDATES); |
| 61 ENUM_CASE(PROCESS_UPDATES); | 61 ENUM_CASE(PROCESS_UPDATES); |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 entry->Put(SERVER_CTIME, Time()); | 290 entry->Put(SERVER_CTIME, Time()); |
| 291 entry->Put(SERVER_VERSION, 0); | 291 entry->Put(SERVER_VERSION, 0); |
| 292 entry->Put(SERVER_IS_DIR, false); | 292 entry->Put(SERVER_IS_DIR, false); |
| 293 entry->Put(SERVER_IS_DEL, false); | 293 entry->Put(SERVER_IS_DEL, false); |
| 294 entry->Put(IS_UNAPPLIED_UPDATE, false); | 294 entry->Put(IS_UNAPPLIED_UPDATE, false); |
| 295 entry->Put(SERVER_SPECIFICS, sync_pb::EntitySpecifics::default_instance()); | 295 entry->Put(SERVER_SPECIFICS, sync_pb::EntitySpecifics::default_instance()); |
| 296 entry->Put(SERVER_POSITION_IN_PARENT, 0); | 296 entry->Put(SERVER_POSITION_IN_PARENT, 0); |
| 297 } | 297 } |
| 298 | 298 |
| 299 } // namespace syncer | 299 } // namespace syncer |
| OLD | NEW |