fake_profile.cc revision 4e180b6a0b4720a9b8e9e959a882386f690f08ff
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 const GURL& requesting_frame, 59 const MIDISysExPermissionCallback& callback) { 60} 61 62content::ResourceContext* FakeProfile::GetResourceContext() { 63 return NULL; 64} 65 66content::GeolocationPermissionContext* 67FakeProfile::GetGeolocationPermissionContext() { 68 return NULL; 69} 70 71quota::SpecialStoragePolicy* FakeProfile::GetSpecialStoragePolicy() { 72 return NULL; 73} 74 75scoped_refptr<base::SequencedTaskRunner> 76FakeProfile::GetIOTaskRunner() { 77 return scoped_refptr<base::SequencedTaskRunner>(); 78} 79 80Profile* FakeProfile::GetOffTheRecordProfile() { 81 return NULL; 82} 83 84void FakeProfile::DestroyOffTheRecordProfile() {} 85 86bool FakeProfile::HasOffTheRecordProfile() { 87 return false; 88} 89 90Profile* FakeProfile::GetOriginalProfile() { 91 return this; 92} 93 94bool FakeProfile::IsManaged() { 95 return false; 96} 97 98history::TopSites* FakeProfile::GetTopSites() { 99 return NULL; 100} 101 102history::TopSites* FakeProfile::GetTopSitesWithoutCreating() { 103 return NULL; 104} 105 106ExtensionService* FakeProfile::GetExtensionService() { 107 return NULL; 108} 109 110ExtensionSpecialStoragePolicy* FakeProfile::GetExtensionSpecialStoragePolicy() { 111 return NULL; 112} 113 114PrefService* FakeProfile::GetPrefs() { 115 return NULL; 116} 117 118PrefService* FakeProfile::GetOffTheRecordPrefs() { 119 return NULL; 120} 121 122net::URLRequestContextGetter* FakeProfile::GetRequestContext() { 123 return NULL; 124} 125 126net::URLRequestContextGetter* FakeProfile::GetRequestContextForExtensions() { 127 return NULL; 128} 129 130net::SSLConfigService* FakeProfile::GetSSLConfigService() { 131 return NULL; 132} 133 134HostContentSettingsMap* FakeProfile::GetHostContentSettingsMap() { 135 return NULL; 136} 137 138bool FakeProfile::IsSameProfile(Profile* profile) { 139 return false; 140} 141 142base::Time FakeProfile::GetStartTime() const { 143 return base::Time(); 144} 145 146net::URLRequestContextGetter* FakeProfile::CreateRequestContext( 147 content::ProtocolHandlerMap* protocol_handlers) { 148 return NULL; 149} 150 151net::URLRequestContextGetter* 152FakeProfile::CreateRequestContextForStoragePartition( 153 const base::FilePath& partition_path, 154 bool in_memory, 155 content::ProtocolHandlerMap* protocol_handlers) { 156 return NULL; 157} 158 159base::FilePath FakeProfile::last_selected_directory() { 160 return base::FilePath(); 161} 162 163void FakeProfile::set_last_selected_directory(const base::FilePath& path) {} 164 165#if defined(OS_CHROMEOS) 166void FakeProfile::ChangeAppLocale( 167 const std::string& locale, AppLocaleChangedVia via) {} 168void FakeProfile::OnLogin() {} 169void FakeProfile::InitChromeOSPreferences() {} 170bool FakeProfile::IsLoginProfile() { 171 return false; 172} 173#endif // defined(OS_CHROMEOS) 174 175PrefProxyConfigTracker* FakeProfile::GetProxyConfigTracker() { 176 return NULL; 177} 178 179chrome_browser_net::Predictor* FakeProfile::GetNetworkPredictor() { 180 return NULL; 181} 182 183void FakeProfile::ClearNetworkingHistorySince(base::Time time, 184 const base::Closure& completion) { 185} 186 187GURL FakeProfile::GetHomePage() { 188 return GURL(); 189} 190 191bool FakeProfile::WasCreatedByVersionOrLater(const std::string& version) { 192 return false; 193} 194 195void FakeProfile::SetExitType(ExitType exit_type) { 196} 197 198Profile::ExitType FakeProfile::GetLastSessionExitType() { 199 return EXIT_NORMAL; 200} 201