| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |