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.
5 #include "chrome/browser/ui/app_list/test/fake_profile.h"
7 FakeProfile::FakeProfile(const std::string
& name
)
11 FakeProfile::FakeProfile(const std::string
& name
, const base::FilePath
& path
)
16 std::string
FakeProfile::GetProfileName() {
20 base::FilePath
FakeProfile::GetPath() const {
24 bool FakeProfile::IsOffTheRecord() const {
28 content::DownloadManagerDelegate
*
29 FakeProfile::GetDownloadManagerDelegate() {
33 net::URLRequestContextGetter
* FakeProfile::GetRequestContextForRenderProcess(
34 int renderer_child_id
) {
38 net::URLRequestContextGetter
* FakeProfile::GetMediaRequestContext() {
42 net::URLRequestContextGetter
*
43 FakeProfile::GetMediaRequestContextForRenderProcess(
44 int renderer_child_id
) {
48 net::URLRequestContextGetter
*
49 FakeProfile::GetMediaRequestContextForStoragePartition(
50 const base::FilePath
& partition_path
,
55 void FakeProfile::RequestMidiSysExPermission(
56 int render_process_id
,
59 const GURL
& requesting_frame
,
60 const MidiSysExPermissionCallback
& callback
) {
63 void FakeProfile::CancelMidiSysExPermissionRequest(
64 int render_process_id
,
67 const GURL
& requesting_frame
) {
70 void FakeProfile::RequestProtectedMediaIdentifierPermission(
71 int render_process_id
,
75 const GURL
& requesting_frame
,
76 const ProtectedMediaIdentifierPermissionCallback
& callback
) {
79 void FakeProfile::CancelProtectedMediaIdentifierPermissionRequests(
83 content::ResourceContext
* FakeProfile::GetResourceContext() {
87 content::GeolocationPermissionContext
*
88 FakeProfile::GetGeolocationPermissionContext() {
92 quota::SpecialStoragePolicy
* FakeProfile::GetSpecialStoragePolicy() {
96 scoped_refptr
<base::SequencedTaskRunner
>
97 FakeProfile::GetIOTaskRunner() {
98 return scoped_refptr
<base::SequencedTaskRunner
>();
101 Profile
* FakeProfile::GetOffTheRecordProfile() {
105 void FakeProfile::DestroyOffTheRecordProfile() {}
107 bool FakeProfile::HasOffTheRecordProfile() {
111 Profile
* FakeProfile::GetOriginalProfile() {
115 bool FakeProfile::IsManaged() {
119 history::TopSites
* FakeProfile::GetTopSites() {
123 history::TopSites
* FakeProfile::GetTopSitesWithoutCreating() {
127 ExtensionService
* FakeProfile::GetExtensionService() {
131 ExtensionSpecialStoragePolicy
* FakeProfile::GetExtensionSpecialStoragePolicy() {
135 PrefService
* FakeProfile::GetPrefs() {
139 PrefService
* FakeProfile::GetOffTheRecordPrefs() {
143 net::URLRequestContextGetter
* FakeProfile::GetRequestContext() {
147 net::URLRequestContextGetter
* FakeProfile::GetRequestContextForExtensions() {
151 net::SSLConfigService
* FakeProfile::GetSSLConfigService() {
155 HostContentSettingsMap
* FakeProfile::GetHostContentSettingsMap() {
159 bool FakeProfile::IsSameProfile(Profile
* profile
) {
163 base::Time
FakeProfile::GetStartTime() const {
167 net::URLRequestContextGetter
* FakeProfile::CreateRequestContext(
168 content::ProtocolHandlerMap
* protocol_handlers
) {
172 net::URLRequestContextGetter
*
173 FakeProfile::CreateRequestContextForStoragePartition(
174 const base::FilePath
& partition_path
,
176 content::ProtocolHandlerMap
* protocol_handlers
) {
180 base::FilePath
FakeProfile::last_selected_directory() {
181 return base::FilePath();
184 void FakeProfile::set_last_selected_directory(const base::FilePath
& path
) {}
186 #if defined(OS_CHROMEOS)
187 void FakeProfile::ChangeAppLocale(
188 const std::string
& locale
, AppLocaleChangedVia via
) {}
189 void FakeProfile::OnLogin() {}
190 void FakeProfile::InitChromeOSPreferences() {}
191 #endif // defined(OS_CHROMEOS)
193 PrefProxyConfigTracker
* FakeProfile::GetProxyConfigTracker() {
197 chrome_browser_net::Predictor
* FakeProfile::GetNetworkPredictor() {
201 void FakeProfile::ClearNetworkingHistorySince(base::Time time
,
202 const base::Closure
& completion
) {
205 GURL
FakeProfile::GetHomePage() {
209 bool FakeProfile::WasCreatedByVersionOrLater(const std::string
& version
) {
213 void FakeProfile::SetExitType(ExitType exit_type
) {
216 Profile::ExitType
FakeProfile::GetLastSessionExitType() {