| 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 17 matching lines...) Expand all Loading... |
| 28 } | 28 } |
| 29 | 29 |
| 30 ACTION(ReturnNewDataTypeManager) { | 30 ACTION(ReturnNewDataTypeManager) { |
| 31 return new browser_sync::DataTypeManagerImpl(arg0, arg1); | 31 return new browser_sync::DataTypeManagerImpl(arg0, arg1); |
| 32 } | 32 } |
| 33 | 33 |
| 34 // Mocks out the SyncerThread operations (Pause/Resume) since no thread is | 34 // Mocks out the SyncerThread operations (Pause/Resume) since no thread is |
| 35 // running in these tests, and allows tests to provide a task on construction | 35 // running in these tests, and allows tests to provide a task on construction |
| 36 // to set up initial nodes to mock out an actual server initial sync | 36 // to set up initial nodes to mock out an actual server initial sync |
| 37 // download. | 37 // download. |
| 38 class SyncBackendHostForProfileSyncTest : | 38 class SyncBackendHostForProfileSyncTest : public browser_sync::SyncBackendHost { |
| 39 public browser_sync::SyncBackendHost { | |
| 40 public: | 39 public: |
| 41 SyncBackendHostForProfileSyncTest(browser_sync::SyncFrontend* frontend, | 40 SyncBackendHostForProfileSyncTest(browser_sync::SyncFrontend* frontend, |
| 42 Profile* profile, | 41 Profile* profile, |
| 43 const FilePath& profile_path, | 42 const FilePath& profile_path, |
| 44 const browser_sync::DataTypeController::TypeMap& data_type_controllers, | 43 const browser_sync::DataTypeController::TypeMap& data_type_controllers, |
| 45 Task* initial_condition_setup_task, | 44 Task* initial_condition_setup_task, |
| 46 int num_expected_resumes, | 45 int num_expected_resumes, |
| 47 int num_expected_pauses) | 46 int num_expected_pauses) |
| 48 : browser_sync::SyncBackendHost(frontend, profile, profile_path, | 47 : browser_sync::SyncBackendHost(frontend, profile, profile_path, |
| 49 data_type_controllers), | 48 data_type_controllers), |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 // step is performed synchronously. | 158 // step is performed synchronously. |
| 160 bool synchronous_sync_configuration_; | 159 bool synchronous_sync_configuration_; |
| 161 bool set_expect_resume_expectations_; | 160 bool set_expect_resume_expectations_; |
| 162 int num_expected_resumes_; | 161 int num_expected_resumes_; |
| 163 int num_expected_pauses_; | 162 int num_expected_pauses_; |
| 164 | 163 |
| 165 scoped_ptr<Task> initial_condition_setup_task_; | 164 scoped_ptr<Task> initial_condition_setup_task_; |
| 166 }; | 165 }; |
| 167 | 166 |
| 168 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ | 167 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |