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

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

Issue 10455012: [Sync] Add support for performing a GetKey on startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fred's comments 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
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 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 true /* enable keystore encryption */));
54 context_->set_notifications_enabled(true); 55 context_->set_notifications_enabled(true);
55 context_->set_account_name("Test"); 56 context_->set_account_name("Test");
56 scheduler_.reset( 57 scheduler_.reset(
57 new SyncSchedulerImpl("TestSyncSchedulerWhitebox", context(), syncer)); 58 new SyncSchedulerImpl("TestSyncSchedulerWhitebox", context(), syncer));
58 } 59 }
59 60
60 virtual void TearDown() { 61 virtual void TearDown() {
61 scheduler_.reset(); 62 scheduler_.reset();
62 } 63 }
63 64
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 struct SyncSchedulerImpl::SyncSessionJob job; 262 struct SyncSchedulerImpl::SyncSessionJob job;
262 job.purpose = SyncSchedulerImpl::SyncSessionJob::CONFIGURATION; 263 job.purpose = SyncSchedulerImpl::SyncSessionJob::CONFIGURATION;
263 job.scheduled_start = TimeTicks::Now(); 264 job.scheduled_start = TimeTicks::Now();
264 job.is_canary_job = true; 265 job.is_canary_job = true;
265 SyncSchedulerImpl::JobProcessDecision decision = DecideOnJob(job); 266 SyncSchedulerImpl::JobProcessDecision decision = DecideOnJob(job);
266 267
267 EXPECT_EQ(decision, SyncSchedulerImpl::CONTINUE); 268 EXPECT_EQ(decision, SyncSchedulerImpl::CONTINUE);
268 } 269 }
269 270
270 } // namespace syncer 271 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698