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

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

Issue 12092091: Separate sync and invalidation client IDs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/all_status.cc ('k') | sync/engine/sync_scheduler_whitebox_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/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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 workers.push_back(it->get()); 121 workers.push_back(it->get());
122 } 122 }
123 123
124 connection_.reset(new MockConnectionManager(directory())); 124 connection_.reset(new MockConnectionManager(directory()));
125 connection_->SetServerReachable(); 125 connection_->SetServerReachable();
126 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); 126 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL));
127 context_.reset(new SyncSessionContext( 127 context_.reset(new SyncSessionContext(
128 connection_.get(), directory(), workers, 128 connection_.get(), directory(), workers,
129 &extensions_activity_monitor_, throttled_data_type_tracker_.get(), 129 &extensions_activity_monitor_, throttled_data_type_tracker_.get(),
130 std::vector<SyncEngineEventListener*>(), NULL, NULL, 130 std::vector<SyncEngineEventListener*>(), NULL, NULL,
131 true /* enable keystore encryption */)); 131 true, // enable keystore encryption
132 "fake_invalidator_client_id"));
132 context_->set_routing_info(routing_info_); 133 context_->set_routing_info(routing_info_);
133 context_->set_notifications_enabled(true); 134 context_->set_notifications_enabled(true);
134 context_->set_account_name("Test"); 135 context_->set_account_name("Test");
135 scheduler_.reset( 136 scheduler_.reset(
136 new SyncSchedulerImpl("TestSyncScheduler", 137 new SyncSchedulerImpl("TestSyncScheduler",
137 BackoffDelayProvider::FromDefaults(), 138 BackoffDelayProvider::FromDefaults(),
138 context(), 139 context(),
139 syncer_)); 140 syncer_));
140 } 141 }
141 142
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 // Before we run the scheduled canary, trigger a server connection change. 1250 // Before we run the scheduled canary, trigger a server connection change.
1250 connection()->SetServerReachable(); 1251 connection()->SetServerReachable();
1251 connection()->UpdateConnectionStatus(); 1252 connection()->UpdateConnectionStatus();
1252 scheduler()->OnConnectionStatusChange(); 1253 scheduler()->OnConnectionStatusChange();
1253 scheduler()->ScheduleNudgeAsync( 1254 scheduler()->ScheduleNudgeAsync(
1254 zero(), NUDGE_SOURCE_LOCAL, ModelTypeSet(BOOKMARKS), FROM_HERE); 1255 zero(), NUDGE_SOURCE_LOCAL, ModelTypeSet(BOOKMARKS), FROM_HERE);
1255 MessageLoop::current()->RunUntilIdle(); 1256 MessageLoop::current()->RunUntilIdle();
1256 } 1257 }
1257 1258
1258 } // namespace syncer 1259 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/all_status.cc ('k') | sync/engine/sync_scheduler_whitebox_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698