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

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

Issue 19309002: sync: Add pre-commit update avoidance mode + flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 workers.push_back(it->get()); 143 workers.push_back(it->get());
144 } 144 }
145 145
146 connection_.reset(new MockConnectionManager(directory())); 146 connection_.reset(new MockConnectionManager(directory()));
147 connection_->SetServerReachable(); 147 connection_->SetServerReachable();
148 context_.reset(new SyncSessionContext( 148 context_.reset(new SyncSessionContext(
149 connection_.get(), directory(), workers, 149 connection_.get(), directory(), workers,
150 &extensions_activity_monitor_, 150 &extensions_activity_monitor_,
151 std::vector<SyncEngineEventListener*>(), NULL, NULL, 151 std::vector<SyncEngineEventListener*>(), NULL, NULL,
152 true, // enable keystore encryption 152 true, // enable keystore encryption
153 false, // force enable pre-commit GU avoidance experiment
153 "fake_invalidator_client_id")); 154 "fake_invalidator_client_id"));
154 context_->set_routing_info(routing_info_); 155 context_->set_routing_info(routing_info_);
155 context_->set_notifications_enabled(true); 156 context_->set_notifications_enabled(true);
156 context_->set_account_name("Test"); 157 context_->set_account_name("Test");
157 scheduler_.reset( 158 scheduler_.reset(
158 new SyncSchedulerImpl("TestSyncScheduler", 159 new SyncSchedulerImpl("TestSyncScheduler",
159 BackoffDelayProvider::FromDefaults(), 160 BackoffDelayProvider::FromDefaults(),
160 context(), 161 context(),
161 syncer_)); 162 syncer_));
162 } 163 }
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 base::Bind(&CallbackCounter::Callback, base::Unretained(&counter))); 1280 base::Bind(&CallbackCounter::Callback, base::Unretained(&counter)));
1280 scheduler()->ScheduleConfiguration(params); 1281 scheduler()->ScheduleConfiguration(params);
1281 1282
1282 scheduler()->OnConnectionStatusChange(); 1283 scheduler()->OnConnectionStatusChange();
1283 scheduler()->OnConnectionStatusChange(); 1284 scheduler()->OnConnectionStatusChange();
1284 1285
1285 PumpLoop(); // Run the nudge, that will fail and schedule a quick retry. 1286 PumpLoop(); // Run the nudge, that will fail and schedule a quick retry.
1286 } 1287 }
1287 1288
1288 } // namespace syncer 1289 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/sync_scheduler_impl.cc ('k') | sync/engine/syncer.cc » ('j') | sync/engine/syncer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698