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

Side by Side Diff: sync/engine/sync_scheduler.cc

Issue 10701046: sync: Remove SyncManager::TestingMode in favour of InternalComponentsFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test 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
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/engine/sync_scheduler.h" 5 #include "sync/engine/sync_scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 DCHECK_EQ(MessageLoop::current(), sync_loop_); 1176 DCHECK_EQ(MessageLoop::current(), sync_loop_);
1177 if (ShouldRequestEarlyExit( 1177 if (ShouldRequestEarlyExit(
1178 snapshot.model_neutral_state().sync_protocol_error)) { 1178 snapshot.model_neutral_state().sync_protocol_error)) {
1179 SDVLOG(2) << "Sync Scheduler requesting early exit."; 1179 SDVLOG(2) << "Sync Scheduler requesting early exit.";
1180 syncer_->RequestEarlyExit(); // Thread-safe. 1180 syncer_->RequestEarlyExit(); // Thread-safe.
1181 } 1181 }
1182 if (IsActionableError(snapshot.model_neutral_state().sync_protocol_error)) 1182 if (IsActionableError(snapshot.model_neutral_state().sync_protocol_error))
1183 OnActionableError(snapshot); 1183 OnActionableError(snapshot);
1184 } 1184 }
1185 1185
1186 void SyncScheduler::set_notifications_enabled(bool notifications_enabled) { 1186 void SyncScheduler::SetNotificationsEnabled(bool notifications_enabled) {
1187 DCHECK_EQ(MessageLoop::current(), sync_loop_); 1187 DCHECK_EQ(MessageLoop::current(), sync_loop_);
1188 session_context_->set_notifications_enabled(notifications_enabled); 1188 session_context_->set_notifications_enabled(notifications_enabled);
1189 } 1189 }
1190 1190
1191 base::TimeDelta SyncScheduler::sessions_commit_delay() const { 1191 base::TimeDelta SyncScheduler::sessions_commit_delay() const {
1192 DCHECK_EQ(MessageLoop::current(), sync_loop_); 1192 DCHECK_EQ(MessageLoop::current(), sync_loop_);
1193 return sessions_commit_delay_; 1193 return sessions_commit_delay_;
1194 } 1194 }
1195 1195
1196 #undef SDVLOG_LOC 1196 #undef SDVLOG_LOC
1197 1197
1198 #undef SDVLOG 1198 #undef SDVLOG
1199 1199
1200 #undef SLOG 1200 #undef SLOG
1201 1201
1202 #undef ENUM_CASE 1202 #undef ENUM_CASE
1203 1203
1204 } // namespace syncer 1204 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698