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 bool FakeProfile::IsSameProfile(Profile
* profile
) {
150 base::Time
FakeProfile::GetStartTime() const {
154 net::URLRequestContextGetter
* FakeProfile::CreateRequestContext(
155 content::ProtocolHandlerMap
* protocol_handlers
,
156 content::URLRequestInterceptorScopedVector request_interceptors
) {
160 net::URLRequestContextGetter
*
161 FakeProfile::CreateRequestContextForStoragePartition(
162 const base::FilePath
& partition_path
,
164 content::ProtocolHandlerMap
* protocol_handlers
,
165 content::URLRequestInterceptorScopedVector request_interceptors
) {
169 base::FilePath
FakeProfile::last_selected_directory() {
170 return base::FilePath();
173 void FakeProfile::set_last_selected_directory(const base::FilePath
& path
) {}
175 #if defined(OS_CHROMEOS)
176 void FakeProfile::ChangeAppLocale(
177 const std::string
& locale
, AppLocaleChangedVia via
) {}
178 void FakeProfile::OnLogin() {}
179 void FakeProfile::InitChromeOSPreferences() {}
180 #endif // defined(OS_CHROMEOS)
182 PrefProxyConfigTracker
* FakeProfile::GetProxyConfigTracker() {
186 chrome_browser_net::Predictor
* FakeProfile::GetNetworkPredictor() {
190 DevToolsNetworkControllerHandle
*
191 FakeProfile::GetDevToolsNetworkControllerHandle() {
195 void FakeProfile::ClearNetworkingHistorySince(
197 const base::Closure
& completion
) {
200 GURL
FakeProfile::GetHomePage() {
204 bool FakeProfile::WasCreatedByVersionOrLater(const std::string
& version
) {
208 void FakeProfile::SetExitType(ExitType exit_type
) {
211 Profile::ExitType
FakeProfile::GetLastSessionExitType() {