Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / app_list / test / fake_profile.cc
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
7 FakeProfile::FakeProfile(const std::string& name)
8     : name_(name) {
9 }
10
11 FakeProfile::FakeProfile(const std::string& name, const base::FilePath& path)
12     : name_(name),
13       path_(path) {
14 }
15
16 std::string FakeProfile::GetProfileName() {
17   return name_;
18 }
19
20 Profile::ProfileType FakeProfile::GetProfileType() const {
21   return REGULAR_PROFILE;
22 }
23
24 base::FilePath FakeProfile::GetPath() const {
25   return path_;
26 }
27
28 bool FakeProfile::IsOffTheRecord() const {
29   return false;
30 }
31
32 content::DownloadManagerDelegate*
33 FakeProfile::GetDownloadManagerDelegate() {
34   return NULL;
35 }
36
37 net::URLRequestContextGetter* FakeProfile::GetRequestContextForRenderProcess(
38     int renderer_child_id) {
39   return NULL;
40 }
41
42 net::URLRequestContextGetter* FakeProfile::GetMediaRequestContext() {
43   return NULL;
44 }
45
46 net::URLRequestContextGetter*
47 FakeProfile::GetMediaRequestContextForRenderProcess(
48     int renderer_child_id) {
49   return NULL;
50 }
51
52 net::URLRequestContextGetter*
53 FakeProfile::GetMediaRequestContextForStoragePartition(
54         const base::FilePath& partition_path,
55         bool in_memory) {
56   return NULL;
57 }
58
59 void FakeProfile::RequestMidiSysExPermission(
60     int render_process_id,
61     int render_view_id,
62     int bridge_id,
63     const GURL& requesting_frame,
64     bool user_gesture,
65     const MidiSysExPermissionCallback& callback) {
66 }
67
68 void FakeProfile::CancelMidiSysExPermissionRequest(
69     int render_process_id,
70     int render_view_id,
71     int bridge_id,
72     const GURL& requesting_frame) {
73 }
74
75 void FakeProfile::RequestProtectedMediaIdentifierPermission(
76     int render_process_id,
77     int render_view_id,
78     int bridge_id,
79     int group_id,
80     const GURL& requesting_frame,
81     const ProtectedMediaIdentifierPermissionCallback& callback) {
82 }
83
84 void FakeProfile::CancelProtectedMediaIdentifierPermissionRequests(
85     int group_id) {
86 }
87
88 content::ResourceContext* FakeProfile::GetResourceContext() {
89   return NULL;
90 }
91
92 content::GeolocationPermissionContext*
93 FakeProfile::GetGeolocationPermissionContext() {
94   return NULL;
95 }
96
97 content::BrowserPluginGuestManagerDelegate*
98 FakeProfile::GetGuestManagerDelegate() {
99   return NULL;
100 }
101
102 quota::SpecialStoragePolicy* FakeProfile::GetSpecialStoragePolicy() {
103   return NULL;
104 }
105
106 scoped_refptr<base::SequencedTaskRunner>
107 FakeProfile::GetIOTaskRunner() {
108   return scoped_refptr<base::SequencedTaskRunner>();
109 }
110
111 Profile* FakeProfile::GetOffTheRecordProfile() {
112   return NULL;
113 }
114
115 void FakeProfile::DestroyOffTheRecordProfile() {}
116
117 bool FakeProfile::HasOffTheRecordProfile() {
118   return false;
119 }
120
121 Profile* FakeProfile::GetOriginalProfile() {
122   return this;
123 }
124
125 bool FakeProfile::IsManaged() {
126   return false;
127 }
128
129 history::TopSites* FakeProfile::GetTopSites() {
130   return NULL;
131 }
132
133 history::TopSites* FakeProfile::GetTopSitesWithoutCreating() {
134   return NULL;
135 }
136
137 ExtensionService* FakeProfile::GetExtensionService() {
138   return NULL;
139 }
140
141 ExtensionSpecialStoragePolicy* FakeProfile::GetExtensionSpecialStoragePolicy() {
142   return NULL;
143 }
144
145 PrefService* FakeProfile::GetPrefs() {
146   return NULL;
147 }
148
149 PrefService* FakeProfile::GetOffTheRecordPrefs() {
150   return NULL;
151 }
152
153 net::URLRequestContextGetter* FakeProfile::GetRequestContext() {
154   return NULL;
155 }
156
157 net::URLRequestContextGetter* FakeProfile::GetRequestContextForExtensions() {
158   return NULL;
159 }
160
161 net::SSLConfigService* FakeProfile::GetSSLConfigService() {
162   return NULL;
163 }
164
165 HostContentSettingsMap* FakeProfile::GetHostContentSettingsMap() {
166   return NULL;
167 }
168
169 bool FakeProfile::IsSameProfile(Profile* profile) {
170   return false;
171 }
172
173 base::Time FakeProfile::GetStartTime() const {
174   return base::Time();
175 }
176
177 net::URLRequestContextGetter* FakeProfile::CreateRequestContext(
178     content::ProtocolHandlerMap* protocol_handlers,
179     content::ProtocolHandlerScopedVector protocol_interceptors) {
180   return NULL;
181 }
182
183 net::URLRequestContextGetter*
184 FakeProfile::CreateRequestContextForStoragePartition(
185     const base::FilePath& partition_path,
186     bool in_memory,
187     content::ProtocolHandlerMap* protocol_handlers,
188     content::ProtocolHandlerScopedVector protocol_interceptors) {
189   return NULL;
190 }
191
192 base::FilePath FakeProfile::last_selected_directory() {
193   return base::FilePath();
194 }
195
196 void FakeProfile::set_last_selected_directory(const base::FilePath& path) {}
197
198 #if defined(OS_CHROMEOS)
199 void FakeProfile::ChangeAppLocale(
200     const std::string& locale, AppLocaleChangedVia via) {}
201 void FakeProfile::OnLogin() {}
202 void FakeProfile::InitChromeOSPreferences() {}
203 #endif  // defined(OS_CHROMEOS)
204
205 PrefProxyConfigTracker* FakeProfile::GetProxyConfigTracker() {
206   return NULL;
207 }
208
209 chrome_browser_net::Predictor* FakeProfile::GetNetworkPredictor() {
210   return NULL;
211 }
212
213 void FakeProfile::ClearNetworkingHistorySince(base::Time time,
214                                               const base::Closure& completion) {
215 }
216
217 GURL FakeProfile::GetHomePage() {
218   return GURL();
219 }
220
221 bool FakeProfile::WasCreatedByVersionOrLater(const std::string& version) {
222   return false;
223 }
224
225 void FakeProfile::SetExitType(ExitType exit_type) {
226 }
227
228 Profile::ExitType FakeProfile::GetLastSessionExitType() {
229   return EXIT_NORMAL;
230 }