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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 int renderer_child_id) override; | 230 int renderer_child_id) override; |
231 content::ResourceContext* GetResourceContext() override; | 231 content::ResourceContext* GetResourceContext() override; |
232 content::BrowserPluginGuestManager* GetGuestManager() override; | 232 content::BrowserPluginGuestManager* GetGuestManager() override; |
233 storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; | 233 storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; |
234 content::PushMessagingService* GetPushMessagingService() override; | 234 content::PushMessagingService* GetPushMessagingService() override; |
235 content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; | 235 content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; |
236 | 236 |
237 TestingProfile* AsTestingProfile() override; | 237 TestingProfile* AsTestingProfile() override; |
238 | 238 |
239 // Profile | 239 // Profile |
240 std::string GetProfileUserName() override; | 240 std::string GetProfileUserName() const override; |
241 ProfileType GetProfileType() const override; | 241 ProfileType GetProfileType() const override; |
242 | 242 |
243 // DEPRECATED, because it's fragile to change a profile from non-incognito | 243 // DEPRECATED, because it's fragile to change a profile from non-incognito |
244 // to incognito after the ProfileKeyedServices have been created (some | 244 // to incognito after the ProfileKeyedServices have been created (some |
245 // ProfileKeyedServices either should not exist in incognito mode, or will | 245 // ProfileKeyedServices either should not exist in incognito mode, or will |
246 // crash when they try to get references to other services they depend on, | 246 // crash when they try to get references to other services they depend on, |
247 // but do not exist in incognito mode). | 247 // but do not exist in incognito mode). |
248 // TODO(atwilson): Remove this API (http://crbug.com/277296). | 248 // TODO(atwilson): Remove this API (http://crbug.com/277296). |
249 // | 249 // |
250 // Changes a profile's to/from incognito mode temporarily - profile will be | 250 // Changes a profile's to/from incognito mode temporarily - profile will be |
(...skipping 17 matching lines...) Expand all Loading... |
268 void SetExtensionSpecialStoragePolicy( | 268 void SetExtensionSpecialStoragePolicy( |
269 ExtensionSpecialStoragePolicy* extension_special_storage_policy); | 269 ExtensionSpecialStoragePolicy* extension_special_storage_policy); |
270 #endif | 270 #endif |
271 ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() override; | 271 ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() override; |
272 // TODO(ajwong): Remove this API in favor of directly retrieving the | 272 // TODO(ajwong): Remove this API in favor of directly retrieving the |
273 // CookieStore from the StoragePartition after ExtensionURLRequestContext | 273 // CookieStore from the StoragePartition after ExtensionURLRequestContext |
274 // has been removed. | 274 // has been removed. |
275 net::CookieMonster* GetCookieMonster(); | 275 net::CookieMonster* GetCookieMonster(); |
276 | 276 |
277 PrefService* GetPrefs() override; | 277 PrefService* GetPrefs() override; |
| 278 const PrefService* GetPrefs() const override; |
278 | 279 |
279 net::URLRequestContextGetter* GetMediaRequestContext() override; | 280 net::URLRequestContextGetter* GetMediaRequestContext() override; |
280 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( | 281 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( |
281 int renderer_child_id) override; | 282 int renderer_child_id) override; |
282 net::URLRequestContextGetter* GetRequestContextForExtensions() override; | 283 net::URLRequestContextGetter* GetRequestContextForExtensions() override; |
283 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( | 284 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( |
284 const base::FilePath& partition_path, | 285 const base::FilePath& partition_path, |
285 bool in_memory) override; | 286 bool in_memory) override; |
286 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 287 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
287 const base::FilePath& partition_path, | 288 const base::FilePath& partition_path, |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 | 405 |
405 // Weak pointer to a delegate for indicating that a profile was created. | 406 // Weak pointer to a delegate for indicating that a profile was created. |
406 Delegate* delegate_; | 407 Delegate* delegate_; |
407 | 408 |
408 std::string profile_name_; | 409 std::string profile_name_; |
409 | 410 |
410 scoped_ptr<policy::PolicyService> policy_service_; | 411 scoped_ptr<policy::PolicyService> policy_service_; |
411 }; | 412 }; |
412 | 413 |
413 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 414 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ |
OLD | NEW |