| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_ | 5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| 6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ | 6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 void BlockUntilTopSitesLoaded(); | 167 void BlockUntilTopSitesLoaded(); |
| 168 | 168 |
| 169 TestingPrefServiceSyncable* GetTestingPrefService(); | 169 TestingPrefServiceSyncable* GetTestingPrefService(); |
| 170 | 170 |
| 171 // content::BrowserContext | 171 // content::BrowserContext |
| 172 virtual base::FilePath GetPath() const OVERRIDE; | 172 virtual base::FilePath GetPath() const OVERRIDE; |
| 173 virtual scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() OVERRIDE; | 173 virtual scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() OVERRIDE; |
| 174 virtual bool IsOffTheRecord() const OVERRIDE; | 174 virtual bool IsOffTheRecord() const OVERRIDE; |
| 175 virtual content::DownloadManagerDelegate* | 175 virtual content::DownloadManagerDelegate* |
| 176 GetDownloadManagerDelegate() OVERRIDE; | 176 GetDownloadManagerDelegate() OVERRIDE; |
| 177 virtual void OverrideCookieStoreConfigs(const base::FilePath& partition_path, |
| 178 bool in_memory_partition, |
| 179 bool is_default_partition, |
| 180 CookieSchemeMap* configs) OVERRIDE; |
| 177 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 181 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; |
| 178 virtual net::URLRequestContextGetter* CreateRequestContext( | 182 virtual net::URLRequestContextGetter* CreateRequestContext( |
| 179 content::ProtocolHandlerMap* protocol_handlers) OVERRIDE; | 183 content::ProtocolHandlerMap* protocol_handlers) OVERRIDE; |
| 180 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 184 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
| 181 int renderer_child_id) OVERRIDE; | 185 int renderer_child_id) OVERRIDE; |
| 182 virtual content::ResourceContext* GetResourceContext() OVERRIDE; | 186 virtual content::ResourceContext* GetResourceContext() OVERRIDE; |
| 183 virtual content::GeolocationPermissionContext* | 187 virtual content::GeolocationPermissionContext* |
| 184 GetGeolocationPermissionContext() OVERRIDE; | 188 GetGeolocationPermissionContext() OVERRIDE; |
| 185 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 189 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; |
| 186 | 190 |
| 187 virtual TestingProfile* AsTestingProfile() OVERRIDE; | 191 virtual TestingProfile* AsTestingProfile() OVERRIDE; |
| 188 virtual std::string GetProfileName() OVERRIDE; | 192 virtual std::string GetProfileName() OVERRIDE; |
| 189 void set_incognito(bool incognito) { incognito_ = incognito; } | 193 void set_incognito(bool incognito) { incognito_ = incognito; } |
| 190 // Assumes ownership. | 194 // Assumes ownership. |
| 191 virtual void SetOffTheRecordProfile(Profile* profile); | 195 virtual void SetOffTheRecordProfile(Profile* profile); |
| 192 virtual void SetOriginalProfile(Profile* profile); | 196 virtual void SetOriginalProfile(Profile* profile); |
| 193 virtual Profile* GetOffTheRecordProfile() OVERRIDE; | 197 virtual Profile* GetOffTheRecordProfile() OVERRIDE; |
| 194 virtual void DestroyOffTheRecordProfile() OVERRIDE {} | 198 virtual void DestroyOffTheRecordProfile() OVERRIDE {} |
| 195 virtual bool HasOffTheRecordProfile() OVERRIDE; | 199 virtual bool HasOffTheRecordProfile() OVERRIDE; |
| 196 virtual Profile* GetOriginalProfile() OVERRIDE; | 200 virtual Profile* GetOriginalProfile() OVERRIDE; |
| 197 virtual bool IsManaged() OVERRIDE; | 201 virtual bool IsManaged() OVERRIDE; |
| 198 virtual ExtensionService* GetExtensionService() OVERRIDE; | 202 virtual ExtensionService* GetExtensionService() OVERRIDE; |
| 199 void SetExtensionSpecialStoragePolicy( | 203 void SetExtensionSpecialStoragePolicy( |
| 200 ExtensionSpecialStoragePolicy* extension_special_storage_policy); | 204 ExtensionSpecialStoragePolicy* extension_special_storage_policy); |
| 201 virtual ExtensionSpecialStoragePolicy* | 205 virtual ExtensionSpecialStoragePolicy* |
| 202 GetExtensionSpecialStoragePolicy() OVERRIDE; | 206 GetExtensionSpecialStoragePolicy() OVERRIDE; |
| 203 // TODO(ajwong): Remove this API in favor of directly retrieving the | |
| 204 // CookieStore from the StoragePartition after ExtensionURLRequestContext | |
| 205 // has been removed. | |
| 206 net::CookieMonster* GetCookieMonster(); | |
| 207 | 207 |
| 208 virtual PrefService* GetPrefs() OVERRIDE; | 208 virtual PrefService* GetPrefs() OVERRIDE; |
| 209 | 209 |
| 210 virtual history::TopSites* GetTopSites() OVERRIDE; | 210 virtual history::TopSites* GetTopSites() OVERRIDE; |
| 211 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE; | 211 virtual history::TopSites* GetTopSitesWithoutCreating() OVERRIDE; |
| 212 | 212 |
| 213 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; | 213 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; |
| 214 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( | 214 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( |
| 215 int renderer_child_id) OVERRIDE; | 215 int renderer_child_id) OVERRIDE; |
| 216 virtual net::URLRequestContextGetter* | 216 virtual net::URLRequestContextGetter* |
| 217 GetRequestContextForExtensions() OVERRIDE; | |
| 218 virtual net::URLRequestContextGetter* | |
| 219 GetMediaRequestContextForStoragePartition( | 217 GetMediaRequestContextForStoragePartition( |
| 220 const base::FilePath& partition_path, | 218 const base::FilePath& partition_path, |
| 221 bool in_memory) OVERRIDE; | 219 bool in_memory) OVERRIDE; |
| 222 virtual void RequestMIDISysExPermission( | 220 virtual void RequestMIDISysExPermission( |
| 223 int render_process_id, | 221 int render_process_id, |
| 224 int render_view_id, | 222 int render_view_id, |
| 225 const GURL& requesting_frame, | 223 const GURL& requesting_frame, |
| 226 const MIDISysExPermissionCallback& callback) OVERRIDE; | 224 const MIDISysExPermissionCallback& callback) OVERRIDE; |
| 227 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 225 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
| 228 const base::FilePath& partition_path, | 226 const base::FilePath& partition_path, |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 // scoped_ptr<>. | 338 // scoped_ptr<>. |
| 341 content::MockResourceContext* resource_context_; | 339 content::MockResourceContext* resource_context_; |
| 342 | 340 |
| 343 scoped_ptr<policy::ProfilePolicyConnector> profile_policy_connector_; | 341 scoped_ptr<policy::ProfilePolicyConnector> profile_policy_connector_; |
| 344 | 342 |
| 345 // Weak pointer to a delegate for indicating that a profile was created. | 343 // Weak pointer to a delegate for indicating that a profile was created. |
| 346 Delegate* delegate_; | 344 Delegate* delegate_; |
| 347 }; | 345 }; |
| 348 | 346 |
| 349 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 347 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| OLD | NEW |