Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 1878153002: Revert of Simplify BrowserContext by removing redundant methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | chromecast/browser/cast_browser_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
795 net::URLRequestContextGetter* TestingProfile::GetMediaRequestContext() { 799 net::URLRequestContextGetter* TestingProfile::GetMediaRequestContext() {
796 return NULL; 800 return NULL;
797 } 801 }
798 802
799 net::URLRequestContextGetter* 803 net::URLRequestContextGetter*
800 TestingProfile::GetMediaRequestContextForRenderProcess( 804 TestingProfile::GetMediaRequestContextForRenderProcess(
801 int renderer_child_id) { 805 int renderer_child_id) {
802 return NULL; 806 return NULL;
803 } 807 }
804 808
805 net::URLRequestContextGetter* 809 net::URLRequestContextGetter*
806 TestingProfile::GetMediaRequestContextForStoragePartition( 810 TestingProfile::GetMediaRequestContextForStoragePartition(
807 const base::FilePath& partition_path, 811 const base::FilePath& partition_path,
808 bool in_memory) { 812 bool in_memory) {
809 return NULL; 813 return NULL;
810 } 814 }
811 815
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
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 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | chromecast/browser/cast_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698