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 #include "chrome/test/base/testing_profile.h" | 5 #include "chrome/test/base/testing_profile.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 | 785 |
786 ChromeZoomLevelPrefs* TestingProfile::GetZoomLevelPrefs() { | 786 ChromeZoomLevelPrefs* TestingProfile::GetZoomLevelPrefs() { |
787 return static_cast<ChromeZoomLevelPrefs*>( | 787 return static_cast<ChromeZoomLevelPrefs*>( |
788 GetDefaultStoragePartition(this)->GetZoomLevelDelegate()); | 788 GetDefaultStoragePartition(this)->GetZoomLevelDelegate()); |
789 } | 789 } |
790 | 790 |
791 DownloadManagerDelegate* TestingProfile::GetDownloadManagerDelegate() { | 791 DownloadManagerDelegate* TestingProfile::GetDownloadManagerDelegate() { |
792 return NULL; | 792 return NULL; |
793 } | 793 } |
794 | 794 |
795 net::URLRequestContextGetter* TestingProfile::GetRequestContext() { | |
796 return GetDefaultStoragePartition(this)->GetURLRequestContext(); | |
797 } | |
798 | |
799 net::URLRequestContextGetter* TestingProfile::GetMediaRequestContext() { | 795 net::URLRequestContextGetter* TestingProfile::GetMediaRequestContext() { |
800 return NULL; | 796 return NULL; |
801 } | 797 } |
802 | 798 |
803 net::URLRequestContextGetter* | 799 net::URLRequestContextGetter* |
804 TestingProfile::GetMediaRequestContextForRenderProcess( | 800 TestingProfile::GetMediaRequestContextForRenderProcess( |
805 int renderer_child_id) { | 801 int renderer_child_id) { |
806 return NULL; | 802 return NULL; |
807 } | 803 } |
808 | 804 |
809 net::URLRequestContextGetter* | 805 net::URLRequestContextGetter* |
810 TestingProfile::GetMediaRequestContextForStoragePartition( | 806 TestingProfile::GetMediaRequestContextForStoragePartition( |
811 const base::FilePath& partition_path, | 807 const base::FilePath& partition_path, |
812 bool in_memory) { | 808 bool in_memory) { |
813 return NULL; | 809 return NULL; |
814 } | 810 } |
815 | 811 |
| 812 net::URLRequestContextGetter* TestingProfile::GetRequestContext() { |
| 813 return GetDefaultStoragePartition(this)->GetURLRequestContext(); |
| 814 } |
| 815 |
816 net::URLRequestContextGetter* TestingProfile::GetRequestContextForExtensions() { | 816 net::URLRequestContextGetter* TestingProfile::GetRequestContextForExtensions() { |
817 if (!extensions_request_context_.get()) | 817 if (!extensions_request_context_.get()) |
818 extensions_request_context_ = new TestExtensionURLRequestContextGetter(); | 818 extensions_request_context_ = new TestExtensionURLRequestContextGetter(); |
819 return extensions_request_context_.get(); | 819 return extensions_request_context_.get(); |
820 } | 820 } |
821 | 821 |
822 net::SSLConfigService* TestingProfile::GetSSLConfigService() { | 822 net::SSLConfigService* TestingProfile::GetSSLConfigService() { |
823 if (!GetRequestContext()) | 823 if (!GetRequestContext()) |
824 return NULL; | 824 return NULL; |
825 return GetRequestContext()->GetURLRequestContext()->ssl_config_service(); | 825 return GetRequestContext()->GetURLRequestContext()->ssl_config_service(); |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 // Note: Owned by |original_profile|. | 1035 // Note: Owned by |original_profile|. |
1036 return new TestingProfile(path_, delegate_, | 1036 return new TestingProfile(path_, delegate_, |
1037 #if defined(ENABLE_EXTENSIONS) | 1037 #if defined(ENABLE_EXTENSIONS) |
1038 extension_policy_, | 1038 extension_policy_, |
1039 #endif | 1039 #endif |
1040 std::move(pref_service_), original_profile, | 1040 std::move(pref_service_), original_profile, |
1041 guest_session_, supervised_user_id_, | 1041 guest_session_, supervised_user_id_, |
1042 std::move(policy_service_), testing_factories_, | 1042 std::move(policy_service_), testing_factories_, |
1043 profile_name_); | 1043 profile_name_); |
1044 } | 1044 } |
OLD | NEW |