Upstream version 6.35.121.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 quota::SpecialStoragePolicy* FakeProfile::GetSpecialStoragePolicy() {
98   return NULL;
99 }
100
101 scoped_refptr<base::SequencedTaskRunner>
102 FakeProfile::GetIOTaskRunner() {
103   return scoped_refptr<base::SequencedTaskRunner>();
104 }
105
106 Profile* FakeProfile::GetOffTheRecordProfile() {
107   return NULL;
108 }
109
110 void FakeProfile::DestroyOffTheRecordProfile() {}
111
112 bool FakeProfile::HasOffTheRecordProfile() {
113   return false;
114 }
115
116 Profile* FakeProfile::GetOriginalProfile() {
117   return this;
118 }
119
120 bool FakeProfile::IsManaged() {
121   return false;
122 }
123
124 history::TopSites* FakeProfile::GetTopSites() {
125   return NULL;
126 }
127
128 history::TopSites* FakeProfile::GetTopSitesWithoutCreating() {
129   return NULL;
130 }
131
132 ExtensionService* FakeProfile::GetExtensionService() {
133   return NULL;
134 }
135
136 ExtensionSpecialStoragePolicy* FakeProfile::GetExtensionSpecialStoragePolicy() {
137   return NULL;
138 }
139
140 PrefService* FakeProfile::GetPrefs() {
141   return NULL;
142 }
143
144 PrefService* FakeProfile::GetOffTheRecordPrefs() {
145   return NULL;
146 }
147
148 net::URLRequestContextGetter* FakeProfile::GetRequestContext() {
149   return NULL;
150 }
151
152 net::URLRequestContextGetter* FakeProfile::GetRequestContextForExtensions() {
153   return NULL;
154 }
155
156 net::SSLConfigService* FakeProfile::GetSSLConfigService() {
157   return NULL;
158 }
159
160 HostContentSettingsMap* FakeProfile::GetHostContentSettingsMap() {
161   return NULL;
162 }
163
164 bool FakeProfile::IsSameProfile(Profile* profile) {
165   return false;
166 }
167
168 base::Time FakeProfile::GetStartTime() const {
169   return base::Time();
170 }
171
172 net::URLRequestContextGetter* FakeProfile::CreateRequestContext(
173     content::ProtocolHandlerMap* protocol_handlers,
174     content::ProtocolHandlerScopedVector protocol_interceptors) {
175   return NULL;
176 }
177
178 net::URLRequestContextGetter*
179 FakeProfile::CreateRequestContextForStoragePartition(
180     const base::FilePath& partition_path,
181     bool in_memory,
182     content::ProtocolHandlerMap* protocol_handlers,
183     content::ProtocolHandlerScopedVector protocol_interceptors) {
184   return NULL;
185 }
186
187 base::FilePath FakeProfile::last_selected_directory() {
188   return base::FilePath();
189 }
190
191 void FakeProfile::set_last_selected_directory(const base::FilePath& path) {}
192
193 #if defined(OS_CHROMEOS)
194 void FakeProfile::ChangeAppLocale(
195     const std::string& locale, AppLocaleChangedVia via) {}
196 void FakeProfile::OnLogin() {}
197 void FakeProfile::InitChromeOSPreferences() {}
198 #endif  // defined(OS_CHROMEOS)
199
200 PrefProxyConfigTracker* FakeProfile::GetProxyConfigTracker() {
201   return NULL;
202 }
203
204 chrome_browser_net::Predictor* FakeProfile::GetNetworkPredictor() {
205   return NULL;
206 }
207
208 void FakeProfile::ClearNetworkingHistorySince(base::Time time,
209                                               const base::Closure& completion) {
210 }
211
212 GURL FakeProfile::GetHomePage() {
213   return GURL();
214 }
215
216 bool FakeProfile::WasCreatedByVersionOrLater(const std::string& version) {
217   return false;
218 }
219
220 void FakeProfile::SetExitType(ExitType exit_type) {
221 }
222
223 Profile::ExitType FakeProfile::GetLastSessionExitType() {
224   return EXIT_NORMAL;
225 }