| 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/syncable/syncable_util.h" | 5 #include "sync/syncable/syncable_util.h" |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "sync/syncable/directory.h" | 9 #include "sync/syncable/directory.h" |
| 10 #include "sync/syncable/entry.h" | 10 #include "sync/syncable/entry.h" |
| 11 #include "sync/syncable/mutable_entry.h" | 11 #include "sync/syncable/mutable_entry.h" |
| 12 #include "sync/syncable/syncable_id.h" | 12 #include "sync/syncable/syncable_id.h" |
| 13 #include "sync/syncable/write_transaction.h" | 13 #include "sync/syncable/write_transaction.h" |
| 14 | 14 |
| 15 namespace syncer { |
| 15 namespace syncable { | 16 namespace syncable { |
| 16 | 17 |
| 17 // Returns the number of unsynced entries. | 18 // Returns the number of unsynced entries. |
| 18 int GetUnsyncedEntries(BaseTransaction* trans, | 19 int GetUnsyncedEntries(BaseTransaction* trans, |
| 19 std::vector<int64> *handles) { | 20 std::vector<int64> *handles) { |
| 20 trans->directory()->GetUnsyncedMetaHandles(trans, handles); | 21 trans->directory()->GetUnsyncedMetaHandles(trans, handles); |
| 21 DVLOG_IF(1, !handles->empty()) << "Have " << handles->size() | 22 DVLOG_IF(1, !handles->empty()) << "Have " << handles->size() |
| 22 << " unsynced items."; | 23 << " unsynced items."; |
| 23 return handles->size(); | 24 return handles->size(); |
| 24 } | 25 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 const char* msg, | 106 const char* msg, |
| 106 BaseTransaction* trans) { | 107 BaseTransaction* trans) { |
| 107 if (!condition) { | 108 if (!condition) { |
| 108 trans->OnUnrecoverableError(location, msg); | 109 trans->OnUnrecoverableError(location, msg); |
| 109 return false; | 110 return false; |
| 110 } | 111 } |
| 111 return true; | 112 return true; |
| 112 } | 113 } |
| 113 | 114 |
| 114 } // namespace syncable | 115 } // namespace syncable |
| 116 } // namespace syncer |
| OLD | NEW |