Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Side by Side Diff: sync/syncable/syncable_util.cc

Issue 10699044: [Sync] Move sync/{internal_api,syncable} into syncer namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/syncable/syncable_util.h ('k') | sync/syncable/transaction_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « sync/syncable/syncable_util.h ('k') | sync/syncable/transaction_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698