| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/signin/easy_unlock_service.h" | 5 #include "chrome/browser/signin/easy_unlock_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 289 |
| 290 mock_user_manager_->AddUser(account_id); | 290 mock_user_manager_->AddUser(account_id); |
| 291 profile->get()->set_profile_name(account_id.GetUserEmail()); | 291 profile->get()->set_profile_name(account_id.GetUserEmail()); |
| 292 | 292 |
| 293 SigninManagerBase* signin_manager = | 293 SigninManagerBase* signin_manager = |
| 294 SigninManagerFactory::GetForProfile(profile->get()); | 294 SigninManagerFactory::GetForProfile(profile->get()); |
| 295 signin_manager->SetAuthenticatedAccountInfo(account_id.GetGaiaId(), | 295 signin_manager->SetAuthenticatedAccountInfo(account_id.GetGaiaId(), |
| 296 account_id.GetUserEmail()); | 296 account_id.GetUserEmail()); |
| 297 } | 297 } |
| 298 | 298 |
| 299 private: |
| 300 // Must outlive TestingProfiles. |
| 301 content::TestBrowserThreadBundle thread_bundle_; |
| 302 |
| 299 protected: | 303 protected: |
| 300 std::unique_ptr<TestingProfile> profile_; | 304 std::unique_ptr<TestingProfile> profile_; |
| 301 std::unique_ptr<TestingProfile> secondary_profile_; | 305 std::unique_ptr<TestingProfile> secondary_profile_; |
| 302 chromeos::MockUserManager* mock_user_manager_; | 306 chromeos::MockUserManager* mock_user_manager_; |
| 303 | 307 |
| 304 private: | 308 private: |
| 305 content::TestBrowserThreadBundle thread_bundle_; | |
| 306 | |
| 307 chromeos::ScopedUserManagerEnabler scoped_user_manager_; | 309 chromeos::ScopedUserManagerEnabler scoped_user_manager_; |
| 308 | 310 |
| 309 FakePowerManagerClient* power_manager_client_; | 311 FakePowerManagerClient* power_manager_client_; |
| 310 | 312 |
| 311 bool is_bluetooth_adapter_present_; | 313 bool is_bluetooth_adapter_present_; |
| 312 scoped_refptr<testing::NiceMock<MockBluetoothAdapter>> mock_adapter_; | 314 scoped_refptr<testing::NiceMock<MockBluetoothAdapter>> mock_adapter_; |
| 313 | 315 |
| 314 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceTest); | 316 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceTest); |
| 315 }; | 317 }; |
| 316 | 318 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 EXPECT_EQ(AccountId::FromUserEmailGaiaId(kTestUserPrimary, kPrimaryGaiaId), | 386 EXPECT_EQ(AccountId::FromUserEmailGaiaId(kTestUserPrimary, kPrimaryGaiaId), |
| 385 EasyUnlockService::Get(profile_.get())->GetAccountId()); | 387 EasyUnlockService::Get(profile_.get())->GetAccountId()); |
| 386 | 388 |
| 387 SetUpSecondaryProfile(); | 389 SetUpSecondaryProfile(); |
| 388 EXPECT_EQ(AccountId::FromUserEmailGaiaId(kTestUserSecondary, | 390 EXPECT_EQ(AccountId::FromUserEmailGaiaId(kTestUserSecondary, |
| 389 kSecondaryGaiaId), | 391 kSecondaryGaiaId), |
| 390 EasyUnlockService::Get(secondary_profile_.get())->GetAccountId()); | 392 EasyUnlockService::Get(secondary_profile_.get())->GetAccountId()); |
| 391 } | 393 } |
| 392 | 394 |
| 393 } // namespace | 395 } // namespace |
| OLD | NEW |