| 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 #include "ios/public/provider/chrome/browser/test_chrome_browser_provider.h" | 5 #include "ios/public/provider/chrome/browser/test_chrome_browser_provider.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h" | 8 #include "ios/public/provider/chrome/browser/signin/fake_chrome_identity_service
.h" |
| 9 #import "ios/public/provider/chrome/browser/test_updatable_resource_provider.h" | 9 #import "ios/public/provider/chrome/browser/test_updatable_resource_provider.h" |
| 10 | 10 |
| 11 namespace ios { | 11 namespace ios { |
| 12 | 12 |
| 13 TestChromeBrowserProvider::TestChromeBrowserProvider() | 13 TestChromeBrowserProvider::TestChromeBrowserProvider() |
| 14 : chrome_identity_service_(new ios::ChromeIdentityService), | 14 : chrome_identity_service_(new ios::FakeChromeIdentityService), |
| 15 test_updatable_resource_provider_(new TestUpdatableResourceProvider) {} | 15 test_updatable_resource_provider_(new TestUpdatableResourceProvider) {} |
| 16 | 16 |
| 17 TestChromeBrowserProvider::~TestChromeBrowserProvider() {} | 17 TestChromeBrowserProvider::~TestChromeBrowserProvider() {} |
| 18 | 18 |
| 19 // static | 19 // static |
| 20 TestChromeBrowserProvider* TestChromeBrowserProvider::GetTestProvider() { | 20 TestChromeBrowserProvider* TestChromeBrowserProvider::GetTestProvider() { |
| 21 ChromeBrowserProvider* provider = GetChromeBrowserProvider(); | 21 ChromeBrowserProvider* provider = GetChromeBrowserProvider(); |
| 22 DCHECK(provider); | 22 DCHECK(provider); |
| 23 return static_cast<TestChromeBrowserProvider*>(provider); | 23 return static_cast<TestChromeBrowserProvider*>(provider); |
| 24 } | 24 } |
| 25 | 25 |
| 26 ChromeIdentityService* TestChromeBrowserProvider::GetChromeIdentityService() { | 26 ChromeIdentityService* TestChromeBrowserProvider::GetChromeIdentityService() { |
| 27 return chrome_identity_service_.get(); | 27 return chrome_identity_service_.get(); |
| 28 } | 28 } |
| 29 | 29 |
| 30 UpdatableResourceProvider* | 30 UpdatableResourceProvider* |
| 31 TestChromeBrowserProvider::GetUpdatableResourceProvider() { | 31 TestChromeBrowserProvider::GetUpdatableResourceProvider() { |
| 32 return test_updatable_resource_provider_.get(); | 32 return test_updatable_resource_provider_.get(); |
| 33 } | 33 } |
| 34 | 34 |
| 35 } // namespace ios | 35 } // namespace ios |
| OLD | NEW |