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

Side by Side Diff: chrome/browser/sync/test_profile_sync_service.h

Issue 6111012: sync: avoid creating a HistoryModelWorker unless it is needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: fix test Created 9 years, 11 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 | « chrome/browser/sync/profile_sync_service_password_unittest.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 if (synchronous_init_) { 160 if (synchronous_init_) {
161 // The SyncBackend posts a task to the current loop when 161 // The SyncBackend posts a task to the current loop when
162 // initialization completes. 162 // initialization completes.
163 MessageLoop::current()->Run(); 163 MessageLoop::current()->Run();
164 } 164 }
165 } 165 }
166 166
167 static void SetDefaultExpectationsForWorkerCreation(ProfileMock* profile) { 167 static void SetDefaultExpectationsForWorkerCreation(ProfileMock* profile) {
168 EXPECT_CALL(*profile, GetPasswordStore(testing::_)). 168 EXPECT_CALL(*profile, GetPasswordStore(testing::_)).
169 WillOnce(testing::Return((PasswordStore*)NULL)); 169 WillOnce(testing::Return((PasswordStore*)NULL));
170 }
171
172 static void SetHistoryServiceExpectations(ProfileMock* profile) {
170 EXPECT_CALL(*profile, GetHistoryService(testing::_)). 173 EXPECT_CALL(*profile, GetHistoryService(testing::_)).
171 WillOnce(testing::Return((HistoryService*)NULL)); 174 WillOnce(testing::Return((HistoryService*)NULL));
172 } 175 }
173 176
174 private: 177 private:
175 Task* initial_condition_setup_task_; 178 Task* initial_condition_setup_task_;
176 bool set_initial_sync_ended_on_init_; 179 bool set_initial_sync_ended_on_init_;
177 bool synchronous_init_; 180 bool synchronous_init_;
178 }; 181 };
179 182
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 bool synchronous_sync_configuration_; 259 bool synchronous_sync_configuration_;
257 bool set_expect_resume_expectations_; 260 bool set_expect_resume_expectations_;
258 int num_expected_resumes_; 261 int num_expected_resumes_;
259 int num_expected_pauses_; 262 int num_expected_pauses_;
260 263
261 scoped_ptr<Task> initial_condition_setup_task_; 264 scoped_ptr<Task> initial_condition_setup_task_;
262 bool set_initial_sync_ended_on_init_; 265 bool set_initial_sync_ended_on_init_;
263 }; 266 };
264 267
265 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 268 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_password_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698