fake_profile.cc revision 03b57e008b61dfcb1fbad3aea950ae0e001748b0
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
67storage::SpecialStoragePolicy* FakeProfile::GetSpecialStoragePolicy() {
68  return NULL;
69}
70
71content::PushMessagingService* FakeProfile::GetPushMessagingService() {
72  return NULL;
73}
74
75content::SSLHostStateDelegate* FakeProfile::GetSSLHostStateDelegate() {
76  return NULL;
77}
78
79scoped_refptr<base::SequencedTaskRunner>
80FakeProfile::GetIOTaskRunner() {
81  return scoped_refptr<base::SequencedTaskRunner>();
82}
83
84Profile* FakeProfile::GetOffTheRecordProfile() {
85  return NULL;
86}
87
88void FakeProfile::DestroyOffTheRecordProfile() {}
89
90bool FakeProfile::HasOffTheRecordProfile() {
91  return false;
92}
93
94Profile* FakeProfile::GetOriginalProfile() {
95  return this;
96}
97
98bool FakeProfile::IsSupervised() {
99  return false;
100}
101
102history::TopSites* FakeProfile::GetTopSites() {
103  return NULL;
104}
105
106history::TopSites* FakeProfile::GetTopSitesWithoutCreating() {
107  return NULL;
108}
109
110ExtensionSpecialStoragePolicy* FakeProfile::GetExtensionSpecialStoragePolicy() {
111  return NULL;
112}
113
114PrefService* FakeProfile::GetPrefs() {
115  return NULL;
116}
117
118PrefService* FakeProfile::GetOffTheRecordPrefs() {
119  return NULL;
120}
121
122net::URLRequestContextGetter* FakeProfile::GetRequestContext() {
123  return NULL;
124}
125
126net::URLRequestContextGetter* FakeProfile::GetRequestContextForExtensions() {
127  return NULL;
128}
129
130net::SSLConfigService* FakeProfile::GetSSLConfigService() {
131  return NULL;
132}
133
134HostContentSettingsMap* FakeProfile::GetHostContentSettingsMap() {
135  return NULL;
136}
137
138bool FakeProfile::IsSameProfile(Profile* profile) {
139  return false;
140}
141
142base::Time FakeProfile::GetStartTime() const {
143  return base::Time();
144}
145
146net::URLRequestContextGetter* FakeProfile::CreateRequestContext(
147    content::ProtocolHandlerMap* protocol_handlers,
148    content::URLRequestInterceptorScopedVector request_interceptors) {
149  return NULL;
150}
151
152net::URLRequestContextGetter*
153FakeProfile::CreateRequestContextForStoragePartition(
154    const base::FilePath& partition_path,
155    bool in_memory,
156    content::ProtocolHandlerMap* protocol_handlers,
157    content::URLRequestInterceptorScopedVector request_interceptors) {
158  return NULL;
159}
160
161base::FilePath FakeProfile::last_selected_directory() {
162  return base::FilePath();
163}
164
165void FakeProfile::set_last_selected_directory(const base::FilePath& path) {}
166
167#if defined(OS_CHROMEOS)
168void FakeProfile::ChangeAppLocale(
169    const std::string& locale, AppLocaleChangedVia via) {}
170void FakeProfile::OnLogin() {}
171void FakeProfile::InitChromeOSPreferences() {}
172#endif  // defined(OS_CHROMEOS)
173
174PrefProxyConfigTracker* FakeProfile::GetProxyConfigTracker() {
175  return NULL;
176}
177
178chrome_browser_net::Predictor* FakeProfile::GetNetworkPredictor() {
179  return NULL;
180}
181
182DevToolsNetworkController* FakeProfile::GetDevToolsNetworkController() {
183  return NULL;
184}
185
186void FakeProfile::ClearNetworkingHistorySince(
187    base::Time time,
188    const base::Closure& completion) {
189}
190
191GURL FakeProfile::GetHomePage() {
192  return GURL();
193}
194
195bool FakeProfile::WasCreatedByVersionOrLater(const std::string& version) {
196  return false;
197}
198
199void FakeProfile::SetExitType(ExitType exit_type) {
200}
201
202Profile::ExitType FakeProfile::GetLastSessionExitType() {
203  return EXIT_NORMAL;
204}
205