| Index: chrome/browser/sync/engine/syncer_util.cc
|
| diff --git a/chrome/browser/sync/engine/syncer_util.cc b/chrome/browser/sync/engine/syncer_util.cc
|
| index 5d64bdd82ac56f6a0b42be9bef12080b307ec39d..040268cb2555c209b69de1120ba7c54a34b42c57 100644
|
| --- a/chrome/browser/sync/engine/syncer_util.cc
|
| +++ b/chrome/browser/sync/engine/syncer_util.cc
|
| @@ -23,6 +23,7 @@
|
| #include "chrome/browser/sync/syncable/model_type.h"
|
| #include "chrome/browser/sync/syncable/syncable.h"
|
| #include "chrome/browser/sync/syncable/syncable_changes_version.h"
|
| +#include "chrome/browser/sync/util/time.h"
|
|
|
| using syncable::BASE_VERSION;
|
| using syncable::Blob;
|
| @@ -425,10 +426,8 @@ void SyncerUtil::UpdateServerFieldsFromUpdate(
|
| target->Put(SERVER_PARENT_ID, update.parent_id());
|
| target->Put(SERVER_NON_UNIQUE_NAME, name);
|
| target->Put(SERVER_VERSION, update.version());
|
| - target->Put(SERVER_CTIME,
|
| - ServerTimeToClientTime(update.ctime()));
|
| - target->Put(SERVER_MTIME,
|
| - ServerTimeToClientTime(update.mtime()));
|
| + target->Put(SERVER_CTIME, browser_sync::ProtoTimeToTime(update.ctime()));
|
| + target->Put(SERVER_MTIME, browser_sync::ProtoTimeToTime(update.mtime()));
|
| target->Put(SERVER_IS_DIR, update.IsFolder());
|
| if (update.has_server_defined_unique_tag()) {
|
| const std::string& tag = update.server_defined_unique_tag();
|
| @@ -495,8 +494,7 @@ bool SyncerUtil::ServerAndLocalOrdersMatch(syncable::Entry* entry) {
|
|
|
| // static
|
| bool SyncerUtil::ServerAndLocalEntriesMatch(syncable::Entry* entry) {
|
| - if (!ClientAndServerTimeMatch(
|
| - entry->Get(CTIME), ClientTimeToServerTime(entry->Get(SERVER_CTIME)))) {
|
| + if (entry->Get(CTIME) != entry->Get(SERVER_CTIME)) {
|
| LOG(WARNING) << "Client and server time mismatch";
|
| return false;
|
| }
|
| @@ -530,12 +528,11 @@ bool SyncerUtil::ServerAndLocalEntriesMatch(syncable::Entry* entry) {
|
| return true;
|
| // For historical reasons, a folder's MTIME changes when its contents change.
|
| // TODO(ncarter): Remove the special casing of MTIME.
|
| - bool time_match = ClientAndServerTimeMatch(entry->Get(MTIME),
|
| - ClientTimeToServerTime(entry->Get(SERVER_MTIME)));
|
| - if (!time_match) {
|
| + if (entry->Get(MTIME) != entry->Get(SERVER_MTIME)) {
|
| LOG(WARNING) << "Time mismatch";
|
| + return false;
|
| }
|
| - return time_match;
|
| + return true;
|
| }
|
|
|
| // static
|
|
|