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