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

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: Move GetEncryptionKey logic into GetUpdates 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 "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.h" 7 #include "sync/engine/sync_scheduler.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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 workers.push_back(it->get()); 44 workers.push_back(it->get());
45 } 45 }
46 46
47 connection_.reset(new MockConnectionManager(NULL)); 47 connection_.reset(new MockConnectionManager(NULL));
48 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); 48 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL));
49 context_.reset( 49 context_.reset(
50 new SyncSessionContext( 50 new SyncSessionContext(
51 connection_.get(), dir_maker_.directory(), 51 connection_.get(), dir_maker_.directory(),
52 routes, workers, &extensions_activity_monitor_, 52 routes, workers, &extensions_activity_monitor_,
53 throttled_data_type_tracker_.get(), 53 throttled_data_type_tracker_.get(),
54 std::vector<SyncEngineEventListener*>(), NULL, NULL)); 54 std::vector<SyncEngineEventListener*>(), NULL, NULL,
55 true /* enable keystore encryption */));
55 context_->set_notifications_enabled(true); 56 context_->set_notifications_enabled(true);
56 context_->set_account_name("Test"); 57 context_->set_account_name("Test");
57 scheduler_.reset( 58 scheduler_.reset(
58 new SyncScheduler("TestSyncSchedulerWhitebox", context(), syncer)); 59 new SyncScheduler("TestSyncSchedulerWhitebox", context(), syncer));
59 } 60 }
60 61
61 virtual void TearDown() { 62 virtual void TearDown() {
62 scheduler_.reset(); 63 scheduler_.reset();
63 } 64 }
64 65
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 struct SyncScheduler::SyncSessionJob job; 262 struct SyncScheduler::SyncSessionJob job;
262 job.purpose = SyncScheduler::SyncSessionJob::CONFIGURATION; 263 job.purpose = SyncScheduler::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 SyncScheduler::JobProcessDecision decision = DecideOnJob(job); 266 SyncScheduler::JobProcessDecision decision = DecideOnJob(job);
266 267
267 EXPECT_EQ(decision, SyncScheduler::CONTINUE); 268 EXPECT_EQ(decision, SyncScheduler::CONTINUE);
268 } 269 }
269 270
270 } // namespace syncer 271 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698