| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_INTEGRATION_PROFILE_SYNC_SERVICE_HARNESS_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_PROFILE_SYNC_SERVICE_HARNESS_H_ |
| 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_PROFILE_SYNC_SERVICE_HARNESS_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_PROFILE_SYNC_SERVICE_HARNESS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 class ProfileSyncServiceHarness { | 32 class ProfileSyncServiceHarness { |
| 33 public: | 33 public: |
| 34 // The type of profile signin method to authenticate a profile. | 34 // The type of profile signin method to authenticate a profile. |
| 35 enum class SigninType { | 35 enum class SigninType { |
| 36 // Fakes user signin process. | 36 // Fakes user signin process. |
| 37 FAKE_SIGNIN, | 37 FAKE_SIGNIN, |
| 38 // Uses UI signin flow and connects to GAIA servers for authentication. | 38 // Uses UI signin flow and connects to GAIA servers for authentication. |
| 39 UI_SIGNIN | 39 UI_SIGNIN |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 static ProfileSyncServiceHarness* Create( | 42 static std::unique_ptr<ProfileSyncServiceHarness> Create( |
| 43 Profile* profile, | 43 Profile* profile, |
| 44 const std::string& username, | 44 const std::string& username, |
| 45 const std::string& password, | 45 const std::string& password, |
| 46 SigninType signin_type); | 46 SigninType signin_type); |
| 47 virtual ~ProfileSyncServiceHarness(); | 47 virtual ~ProfileSyncServiceHarness(); |
| 48 | 48 |
| 49 // Sets the GAIA credentials with which to sign in to sync. | 49 // Sets the GAIA credentials with which to sign in to sync. |
| 50 void SetCredentials(const std::string& username, const std::string& password); | 50 void SetCredentials(const std::string& username, const std::string& password); |
| 51 | 51 |
| 52 // Creates a ProfileSyncService for the profile passed at construction and | 52 // Creates a ProfileSyncService for the profile passed at construction and |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // all refresh tokens used in the tests are different. | 174 // all refresh tokens used in the tests are different. |
| 175 int oauth2_refesh_token_number_; | 175 int oauth2_refesh_token_number_; |
| 176 | 176 |
| 177 // Used for logging. | 177 // Used for logging. |
| 178 const std::string profile_debug_name_; | 178 const std::string profile_debug_name_; |
| 179 | 179 |
| 180 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness); | 180 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceHarness); |
| 181 }; | 181 }; |
| 182 | 182 |
| 183 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_PROFILE_SYNC_SERVICE_HARNESS_H_ | 183 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_PROFILE_SYNC_SERVICE_HARNESS_H_ |
| OLD | NEW |