fake_profile.cc revision 116680a4aac90f2aa7413d9095a592090648e557
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
3// found in the LICENSE file.
4
5#include "chrome/browser/ui/app_list/test/fake_profile.h"
6
7FakeProfile::FakeProfile(const std::string& name)
8    : name_(name) {
9}
10
11FakeProfile::FakeProfile(const std::string& name, const base::FilePath& path)
12    : name_(name),
13      path_(path) {
14}
15
16std::string FakeProfile::GetProfileName() {
17  return name_;
18}
19
20Profile::ProfileType FakeProfile::GetProfileType() const {
21  return REGULAR_PROFILE;
22}
23
24base::FilePath FakeProfile::GetPath() const {
25  return path_;
26}
27
28bool FakeProfile::IsOffTheRecord() const {
29  return false;
30}
31
32content::DownloadManagerDelegate*
33FakeProfile::GetDownloadManagerDelegate() {
34  return NULL;
35}
36
37net::URLRequestContextGetter* FakeProfile::GetRequestContextForRenderProcess(
38    int renderer_child_id) {
39  return NULL;
40}
41
42net::URLRequestContextGetter* FakeProfile::GetMediaRequestContext() {
43  return NULL;
44}
45
46net::URLRequestContextGetter*
47FakeProfile::GetMediaRequestContextForRenderProcess(
48    int renderer_child_id) {
49  return NULL;
50}
51
52net::URLRequestContextGetter*
53FakeProfile::GetMediaRequestContextForStoragePartition(
54        const base::FilePath& partition_path,
55        bool in_memory) {
56  return NULL;
57}
58
59content::ResourceContext* FakeProfile::GetResourceContext() {
60  return NULL;
61}
62
63content::BrowserPluginGuestManager* FakeProfile::GetGuestManager() {
64  return NULL;
65}
66
67quota::SpecialStoragePolicy* FakeProfile::GetSpecialStoragePolicy() {
68  return NULL;
69}
70
71content::PushMessagingService* FakeProfile::GetPushMessagingService() {
72  return NULL;
73}
74
75scoped_refptr<base::SequencedTaskRunner>
76FakeProfile::GetIOTaskRunner() {
77  return scoped_refptr<base::SequencedTaskRunner>();
78}
79
80Profile* FakeProfile::GetOffTheRecordProfile() {
81  return NULL;
82}
83
84void FakeProfile::DestroyOffTheRecordProfile() {}
85
86bool FakeProfile::HasOffTheRecordProfile() {
87  return false;
88}
89
90Profile* FakeProfile::GetOriginalProfile() {
91  return this;
92}
93
94bool FakeProfile::IsSupervised() {
95  return false;
96}
97
98history::TopSites* FakeProfile::GetTopSites() {
99  return NULL;
100}
101
102history::TopSites* FakeProfile::GetTopSitesWithoutCreating() {
103  return NULL;
104}
105
106ExtensionSpecialStoragePolicy* FakeProfile::GetExtensionSpecialStoragePolicy() {
107  return NULL;
108}
109
110PrefService* FakeProfile::GetPrefs() {
111  return NULL;
112}
113
114PrefService* FakeProfile::GetOffTheRecordPrefs() {
115  return NULL;
116}
117
118net::URLRequestContextGetter* FakeProfile::GetRequestContext() {
119  return NULL;
120}
121
122net::URLRequestContextGetter* FakeProfile::GetRequestContextForExtensions() {
123  return NULL;
124}
125
126net::SSLConfigService* FakeProfile::GetSSLConfigService() {
127  return NULL;
128}
129
130HostContentSettingsMap* FakeProfile::GetHostContentSettingsMap() {
131  return NULL;
132}
133
134bool FakeProfile::IsSameProfile(Profile* profile) {
135  return false;
136}
137
138base::Time FakeProfile::GetStartTime() const {
139  return base::Time();
140}
141
142net::URLRequestContextGetter* FakeProfile::CreateRequestContext(
143    content::ProtocolHandlerMap* protocol_handlers,
144    content::URLRequestInterceptorScopedVector request_interceptors) {
145  return NULL;
146}
147
148net::URLRequestContextGetter*
149FakeProfile::CreateRequestContextForStoragePartition(
150    const base::FilePath& partition_path,
151    bool in_memory,
152    content::ProtocolHandlerMap* protocol_handlers,
153    content::URLRequestInterceptorScopedVector request_interceptors) {
154  return NULL;
155}
156
157base::FilePath FakeProfile::last_selected_directory() {
158  return base::FilePath();
159}
160
161void FakeProfile::set_last_selected_directory(const base::FilePath& path) {}
162
163#if defined(OS_CHROMEOS)
164void FakeProfile::ChangeAppLocale(
165    const std::string& locale, AppLocaleChangedVia via) {}
166void FakeProfile::OnLogin() {}
167void FakeProfile::InitChromeOSPreferences() {}
168#endif  // defined(OS_CHROMEOS)
169
170PrefProxyConfigTracker* FakeProfile::GetProxyConfigTracker() {
171  return NULL;
172}
173
174chrome_browser_net::Predictor* FakeProfile::GetNetworkPredictor() {
175  return NULL;
176}
177
178DevToolsNetworkController* FakeProfile::GetDevToolsNetworkController() {
179  return NULL;
180}
181
182void FakeProfile::ClearNetworkingHistorySince(
183    base::Time time,
184    const base::Closure& completion) {
185}
186
187GURL FakeProfile::GetHomePage() {
188  return GURL();
189}
190
191bool FakeProfile::WasCreatedByVersionOrLater(const std::string& version) {
192  return false;
193}
194
195void FakeProfile::SetExitType(ExitType exit_type) {
196}
197
198Profile::ExitType FakeProfile::GetLastSessionExitType() {
199  return EXIT_NORMAL;
200}
201