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

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

Issue 10947039: Removed safe worker calculation from SyncScheduler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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
« sync/sessions/sync_session.cc ('K') | « sync/sessions/sync_session.cc ('k') | no next file » | 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/directory.h" 5 #include "sync/syncable/directory.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/perftimer.h" 8 #include "base/perftimer.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 ReportUnrecoverableErrorFunction report_unrecoverable_error_function, 141 ReportUnrecoverableErrorFunction report_unrecoverable_error_function,
142 NigoriHandler* nigori_handler, 142 NigoriHandler* nigori_handler,
143 Cryptographer* cryptographer) 143 Cryptographer* cryptographer)
144 : kernel_(NULL), 144 : kernel_(NULL),
145 store_(store), 145 store_(store),
146 unrecoverable_error_handler_(unrecoverable_error_handler), 146 unrecoverable_error_handler_(unrecoverable_error_handler),
147 report_unrecoverable_error_function_( 147 report_unrecoverable_error_function_(
148 report_unrecoverable_error_function), 148 report_unrecoverable_error_function),
149 unrecoverable_error_set_(false), 149 unrecoverable_error_set_(false),
150 nigori_handler_(nigori_handler), 150 nigori_handler_(nigori_handler),
151 cryptographer_(cryptographer), 151 cryptographer_(cryptographer) {
rlarocque 2012/09/19 20:15:33 This change doesn't belong in this patch.
152 invariant_check_level_(VERIFY_CHANGES) { 152 //Perform full invariant checking for tests and the debug build.
153 if(DCHECK_IS_ON())
154 invariant_check_level_ = FULL_DB_VERIFICATION;
155 else
156 invariant_check_level_ = VERIFY_CHANGES;
153 } 157 }
154 158
155 Directory::~Directory() { 159 Directory::~Directory() {
156 Close(); 160 Close();
157 } 161 }
158 162
159 DirOpenResult Directory::Open( 163 DirOpenResult Directory::Open(
160 const string& name, 164 const string& name,
161 DirectoryChangeDelegate* delegate, 165 DirectoryChangeDelegate* delegate,
162 const WeakHandle<TransactionObserver>& transaction_observer) { 166 const WeakHandle<TransactionObserver>& transaction_observer) {
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 // There were no children in the linked list. 1238 // There were no children in the linked list.
1235 return NULL; 1239 return NULL;
1236 } 1240 }
1237 1241
1238 ScopedKernelLock::ScopedKernelLock(const Directory* dir) 1242 ScopedKernelLock::ScopedKernelLock(const Directory* dir)
1239 : scoped_lock_(dir->kernel_->mutex), dir_(const_cast<Directory*>(dir)) { 1243 : scoped_lock_(dir->kernel_->mutex), dir_(const_cast<Directory*>(dir)) {
1240 } 1244 }
1241 1245
1242 } // namespace syncable 1246 } // namespace syncable
1243 } // namespace syncer 1247 } // namespace syncer
OLDNEW
« sync/sessions/sync_session.cc ('K') | « sync/sessions/sync_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698