OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/syncable_write_transaction.h" |
14 | 14 |
15 namespace syncer { | 15 namespace syncer { |
16 namespace syncable { | 16 namespace syncable { |
17 | 17 |
18 // Returns the number of unsynced entries. | 18 // Returns the number of unsynced entries. |
19 int GetUnsyncedEntries(BaseTransaction* trans, | 19 int GetUnsyncedEntries(BaseTransaction* trans, |
20 std::vector<int64> *handles) { | 20 std::vector<int64> *handles) { |
21 trans->directory()->GetUnsyncedMetaHandles(trans, handles); | 21 trans->directory()->GetUnsyncedMetaHandles(trans, handles); |
22 DVLOG_IF(1, !handles->empty()) << "Have " << handles->size() | 22 DVLOG_IF(1, !handles->empty()) << "Have " << handles->size() |
23 << " unsynced items."; | 23 << " unsynced items."; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 BaseTransaction* trans) { | 97 BaseTransaction* trans) { |
98 if (!condition) { | 98 if (!condition) { |
99 trans->OnUnrecoverableError(location, msg); | 99 trans->OnUnrecoverableError(location, msg); |
100 return false; | 100 return false; |
101 } | 101 } |
102 return true; | 102 return true; |
103 } | 103 } |
104 | 104 |
105 } // namespace syncable | 105 } // namespace syncable |
106 } // namespace syncer | 106 } // namespace syncer |
OLD | NEW |