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

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

Issue 10804039: Make SyncBackendRegistrar aware of loaded data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 4 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/engine/sync_scheduler_unittest.cc ('k') | sync/engine/syncer_unittest.cc » ('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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/time.h" 6 #include "base/time.h"
7 #include "sync/engine/sync_scheduler_impl.h" 7 #include "sync/engine/sync_scheduler_impl.h"
8 #include "sync/engine/throttled_data_type_tracker.h" 8 #include "sync/engine/throttled_data_type_tracker.h"
9 #include "sync/sessions/sync_session_context.h" 9 #include "sync/sessions/sync_session_context.h"
10 #include "sync/sessions/test_util.h" 10 #include "sync/sessions/test_util.h"
(...skipping 30 matching lines...) Expand all
41 for (std::vector<scoped_refptr<FakeModelWorker> >::iterator it = 41 for (std::vector<scoped_refptr<FakeModelWorker> >::iterator it =
42 workers_.begin(); it != workers_.end(); ++it) { 42 workers_.begin(); it != workers_.end(); ++it) {
43 workers.push_back(it->get()); 43 workers.push_back(it->get());
44 } 44 }
45 45
46 connection_.reset(new MockConnectionManager(NULL)); 46 connection_.reset(new MockConnectionManager(NULL));
47 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); 47 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL));
48 context_.reset( 48 context_.reset(
49 new SyncSessionContext( 49 new SyncSessionContext(
50 connection_.get(), dir_maker_.directory(), 50 connection_.get(), dir_maker_.directory(),
51 routes, workers, &extensions_activity_monitor_, 51 workers, &extensions_activity_monitor_,
52 throttled_data_type_tracker_.get(), 52 throttled_data_type_tracker_.get(),
53 std::vector<SyncEngineEventListener*>(), NULL, NULL)); 53 std::vector<SyncEngineEventListener*>(), NULL, NULL));
54 context_->set_notifications_enabled(true); 54 context_->set_notifications_enabled(true);
55 context_->set_account_name("Test"); 55 context_->set_account_name("Test");
56 scheduler_.reset( 56 scheduler_.reset(
57 new SyncSchedulerImpl("TestSyncSchedulerWhitebox", context(), syncer)); 57 new SyncSchedulerImpl("TestSyncSchedulerWhitebox", context(), syncer));
58 } 58 }
59 59
60 virtual void TearDown() { 60 virtual void TearDown() {
61 scheduler_.reset(); 61 scheduler_.reset();
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 struct SyncSchedulerImpl::SyncSessionJob job; 261 struct SyncSchedulerImpl::SyncSessionJob job;
262 job.purpose = SyncSchedulerImpl::SyncSessionJob::CONFIGURATION; 262 job.purpose = SyncSchedulerImpl::SyncSessionJob::CONFIGURATION;
263 job.scheduled_start = TimeTicks::Now(); 263 job.scheduled_start = TimeTicks::Now();
264 job.is_canary_job = true; 264 job.is_canary_job = true;
265 SyncSchedulerImpl::JobProcessDecision decision = DecideOnJob(job); 265 SyncSchedulerImpl::JobProcessDecision decision = DecideOnJob(job);
266 266
267 EXPECT_EQ(decision, SyncSchedulerImpl::CONTINUE); 267 EXPECT_EQ(decision, SyncSchedulerImpl::CONTINUE);
268 } 268 }
269 269
270 } // namespace syncer 270 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/sync_scheduler_unittest.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698