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::GetProfileUserName() const {
20 Profile::ProfileType
FakeProfile::GetProfileType() const {
21 return REGULAR_PROFILE
;
24 base::FilePath
FakeProfile::GetPath() const {
28 scoped_ptr
<content::ZoomLevelDelegate
> FakeProfile::CreateZoomLevelDelegate(
29 const base::FilePath
& partition_path
) {
33 bool FakeProfile::IsOffTheRecord() const {
37 content::DownloadManagerDelegate
* FakeProfile::GetDownloadManagerDelegate() {
41 net::URLRequestContextGetter
* FakeProfile::GetRequestContextForRenderProcess(
42 int renderer_child_id
) {
46 net::URLRequestContextGetter
* FakeProfile::GetMediaRequestContext() {
50 net::URLRequestContextGetter
*
51 FakeProfile::GetMediaRequestContextForRenderProcess(
52 int renderer_child_id
) {
56 net::URLRequestContextGetter
*
57 FakeProfile::GetMediaRequestContextForStoragePartition(
58 const base::FilePath
& partition_path
,
63 content::ResourceContext
* FakeProfile::GetResourceContext() {
67 content::BrowserPluginGuestManager
* FakeProfile::GetGuestManager() {
71 storage::SpecialStoragePolicy
* FakeProfile::GetSpecialStoragePolicy() {
75 content::PushMessagingService
* FakeProfile::GetPushMessagingService() {
79 content::SSLHostStateDelegate
* FakeProfile::GetSSLHostStateDelegate() {
83 content::PermissionManager
* FakeProfile::GetPermissionManager() {
87 scoped_refptr
<base::SequencedTaskRunner
>
88 FakeProfile::GetIOTaskRunner() {
89 return scoped_refptr
<base::SequencedTaskRunner
>();
92 Profile
* FakeProfile::GetOffTheRecordProfile() {
96 void FakeProfile::DestroyOffTheRecordProfile() {}
98 bool FakeProfile::HasOffTheRecordProfile() {
102 Profile
* FakeProfile::GetOriginalProfile() {
106 bool FakeProfile::IsSupervised() const {
110 bool FakeProfile::IsChild() const {
114 bool FakeProfile::IsLegacySupervised() const {
118 ExtensionSpecialStoragePolicy
* FakeProfile::GetExtensionSpecialStoragePolicy() {
122 PrefService
* FakeProfile::GetPrefs() {
126 const PrefService
* FakeProfile::GetPrefs() const {
130 PrefService
* FakeProfile::GetOffTheRecordPrefs() {
134 net::URLRequestContextGetter
* FakeProfile::GetRequestContext() {
138 net::URLRequestContextGetter
* FakeProfile::GetRequestContextForExtensions() {
142 net::SSLConfigService
* FakeProfile::GetSSLConfigService() {
146 HostContentSettingsMap
* FakeProfile::GetHostContentSettingsMap() {
150 bool FakeProfile::IsSameProfile(Profile
* profile
) {
154 base::Time
FakeProfile::GetStartTime() const {
158 net::URLRequestContextGetter
* FakeProfile::CreateRequestContext(
159 content::ProtocolHandlerMap
* protocol_handlers
,
160 content::URLRequestInterceptorScopedVector request_interceptors
) {
164 net::URLRequestContextGetter
*
165 FakeProfile::CreateRequestContextForStoragePartition(
166 const base::FilePath
& partition_path
,
168 content::ProtocolHandlerMap
* protocol_handlers
,
169 content::URLRequestInterceptorScopedVector request_interceptors
) {
173 base::FilePath
FakeProfile::last_selected_directory() {
174 return base::FilePath();
177 void FakeProfile::set_last_selected_directory(const base::FilePath
& path
) {}
179 #if defined(OS_CHROMEOS)
180 void FakeProfile::ChangeAppLocale(
181 const std::string
& locale
, AppLocaleChangedVia via
) {}
182 void FakeProfile::OnLogin() {}
183 void FakeProfile::InitChromeOSPreferences() {}
184 #endif // defined(OS_CHROMEOS)
186 PrefProxyConfigTracker
* FakeProfile::GetProxyConfigTracker() {
190 chrome_browser_net::Predictor
* FakeProfile::GetNetworkPredictor() {
194 DevToolsNetworkControllerHandle
*
195 FakeProfile::GetDevToolsNetworkControllerHandle() {
199 void FakeProfile::ClearNetworkingHistorySince(
201 const base::Closure
& completion
) {
204 GURL
FakeProfile::GetHomePage() {
208 bool FakeProfile::WasCreatedByVersionOrLater(const std::string
& version
) {
212 void FakeProfile::SetExitType(ExitType exit_type
) {
215 Profile::ExitType
FakeProfile::GetLastSessionExitType() {