blob: 4ad2e6c5a51d3a5f0ce5a4a872435cf06ac01746 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ios/public/test/test_chrome_browser_provider.h"
#include "base/logging.h"
#include "ios/public/provider/chrome/browser/signin/chrome_identity_service.h"
#include "ios/public/test/fake_string_provider.h"
namespace {
const char kUIScheme[] = "chrome";
}
namespace ios {
TestChromeBrowserProvider::TestChromeBrowserProvider()
: chrome_identity_service_(new ios::ChromeIdentityService),
string_provider_(new FakeStringProvider) {}
TestChromeBrowserProvider::~TestChromeBrowserProvider() {
}
// static
TestChromeBrowserProvider* TestChromeBrowserProvider::GetTestProvider() {
ChromeBrowserProvider* provider = GetChromeBrowserProvider();
DCHECK(provider);
return static_cast<TestChromeBrowserProvider*>(provider);
}
ChromeIdentityService* TestChromeBrowserProvider::GetChromeIdentityService() {
return chrome_identity_service_.get();
}
StringProvider* TestChromeBrowserProvider::GetStringProvider() {
return string_provider_.get();
}
const char* TestChromeBrowserProvider::GetChromeUIScheme() {
return kUIScheme;
}
FakeStringProvider*
TestChromeBrowserProvider::GetStringProviderAsFake() {
return string_provider_.get();
}
} // namespace ios
|