| 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_util.h" | 5 #include "sync/engine/syncer_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 using syncable::SERVER_PARENT_ID; | 61 using syncable::SERVER_PARENT_ID; |
| 62 using syncable::SERVER_POSITION_IN_PARENT; | 62 using syncable::SERVER_POSITION_IN_PARENT; |
| 63 using syncable::SERVER_SPECIFICS; | 63 using syncable::SERVER_SPECIFICS; |
| 64 using syncable::SERVER_VERSION; | 64 using syncable::SERVER_VERSION; |
| 65 using syncable::UNIQUE_CLIENT_TAG; | 65 using syncable::UNIQUE_CLIENT_TAG; |
| 66 using syncable::UNIQUE_SERVER_TAG; | 66 using syncable::UNIQUE_SERVER_TAG; |
| 67 using syncable::SPECIFICS; | 67 using syncable::SPECIFICS; |
| 68 using syncable::SYNCER; | 68 using syncable::SYNCER; |
| 69 using syncable::WriteTransaction; | 69 using syncable::WriteTransaction; |
| 70 | 70 |
| 71 namespace csync { | 71 namespace syncer { |
| 72 | 72 |
| 73 // Returns the number of unsynced entries. | 73 // Returns the number of unsynced entries. |
| 74 // static | 74 // static |
| 75 int SyncerUtil::GetUnsyncedEntries(syncable::BaseTransaction* trans, | 75 int SyncerUtil::GetUnsyncedEntries(syncable::BaseTransaction* trans, |
| 76 std::vector<int64> *handles) { | 76 std::vector<int64> *handles) { |
| 77 trans->directory()->GetUnsyncedMetaHandles(trans, handles); | 77 trans->directory()->GetUnsyncedMetaHandles(trans, handles); |
| 78 DVLOG_IF(1, !handles->empty()) << "Have " << handles->size() | 78 DVLOG_IF(1, !handles->empty()) << "Have " << handles->size() |
| 79 << " unsynced items."; | 79 << " unsynced items."; |
| 80 return handles->size(); | 80 return handles->size(); |
| 81 } | 81 } |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 } | 715 } |
| 716 if (update.version() < target->Get(SERVER_VERSION)) { | 716 if (update.version() < target->Get(SERVER_VERSION)) { |
| 717 LOG(WARNING) << "Update older than current server version for " | 717 LOG(WARNING) << "Update older than current server version for " |
| 718 << *target << " Update:" | 718 << *target << " Update:" |
| 719 << SyncerProtoUtil::SyncEntityDebugString(update); | 719 << SyncerProtoUtil::SyncEntityDebugString(update); |
| 720 return VERIFY_SUCCESS; // Expected in new sync protocol. | 720 return VERIFY_SUCCESS; // Expected in new sync protocol. |
| 721 } | 721 } |
| 722 return VERIFY_UNDECIDED; | 722 return VERIFY_UNDECIDED; |
| 723 } | 723 } |
| 724 | 724 |
| 725 } // namespace csync | 725 } // namespace syncer |
| OLD | NEW |