| OLD | NEW |
| 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/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_) | 185 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_) |
| 186 ->UpdateCredentials("test", "oauth2_login_token"); | 186 ->UpdateCredentials("test", "oauth2_login_token"); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void CreateService(ProfileSyncServiceStartBehavior behavior) { | 189 void CreateService(ProfileSyncServiceStartBehavior behavior) { |
| 190 SigninManagerBase* signin = | 190 SigninManagerBase* signin = |
| 191 SigninManagerFactory::GetForProfile(profile_); | 191 SigninManagerFactory::GetForProfile(profile_); |
| 192 signin->SetAuthenticatedUsername("test"); | 192 signin->SetAuthenticatedUsername("test"); |
| 193 ProfileOAuth2TokenService* oauth2_token_service = | 193 ProfileOAuth2TokenService* oauth2_token_service = |
| 194 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_); | 194 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_); |
| 195 components_factory_ = new StrictMock<ProfileSyncComponentsFactoryMock>(); | 195 components_factory_ = new ProfileSyncComponentsFactoryMock(); |
| 196 service_.reset(new ProfileSyncService( | 196 service_.reset(new ProfileSyncService( |
| 197 components_factory_, | 197 components_factory_, |
| 198 profile_, | 198 profile_, |
| 199 make_scoped_ptr(new SupervisedUserSigninManagerWrapper(profile_, | 199 make_scoped_ptr(new SupervisedUserSigninManagerWrapper(profile_, |
| 200 signin)), | 200 signin)), |
| 201 oauth2_token_service, | 201 oauth2_token_service, |
| 202 behavior)); | 202 behavior)); |
| 203 service_->SetClearingBrowseringDataForTesting( | 203 service_->SetClearingBrowseringDataForTesting( |
| 204 base::Bind(&ProfileSyncServiceTest::ClearBrowsingDataCallback, | 204 base::Bind(&ProfileSyncServiceTest::ClearBrowsingDataCallback, |
| 205 base::Unretained(this))); | 205 base::Unretained(this))); |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 // See that we can override the URL with a flag. | 593 // See that we can override the URL with a flag. |
| 594 CommandLine command_line( | 594 CommandLine command_line( |
| 595 base::FilePath(base::FilePath(FILE_PATH_LITERAL("chrome.exe")))); | 595 base::FilePath(base::FilePath(FILE_PATH_LITERAL("chrome.exe")))); |
| 596 command_line.AppendSwitchASCII(switches::kSyncServiceURL, "https://foo/bar"); | 596 command_line.AppendSwitchASCII(switches::kSyncServiceURL, "https://foo/bar"); |
| 597 EXPECT_EQ("https://foo/bar", | 597 EXPECT_EQ("https://foo/bar", |
| 598 ProfileSyncService::GetSyncServiceURL(command_line).spec()); | 598 ProfileSyncService::GetSyncServiceURL(command_line).spec()); |
| 599 } | 599 } |
| 600 | 600 |
| 601 } // namespace | 601 } // namespace |
| 602 } // namespace browser_sync | 602 } // namespace browser_sync |
| OLD | NEW |