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

Side by Side Diff: chrome/browser/io_thread.cc

Issue 2536723009: Make net::URLRequestContext a MemoryDumpProvider (Closed)
Patch Set: fix compile Created 4 years 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 | « no previous file | chrome/browser/profiles/off_the_record_profile_io_data.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/browser/io_thread.h" 5 #include "chrome/browser/io_thread.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 context->set_enable_brotli(globals->enable_brotli); 905 context->set_enable_brotli(globals->enable_brotli);
906 906
907 net::HttpNetworkSession::Params system_params(params); 907 net::HttpNetworkSession::Params system_params(params);
908 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents( 908 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents(
909 context, &system_params); 909 context, &system_params);
910 910
911 globals->system_http_network_session.reset( 911 globals->system_http_network_session.reset(
912 new net::HttpNetworkSession(system_params)); 912 new net::HttpNetworkSession(system_params));
913 globals->system_http_transaction_factory.reset( 913 globals->system_http_transaction_factory.reset(
914 new net::HttpNetworkLayer(globals->system_http_network_session.get())); 914 new net::HttpNetworkLayer(globals->system_http_network_session.get()));
915 context->set_name("system");
915 context->set_http_transaction_factory( 916 context->set_http_transaction_factory(
916 globals->system_http_transaction_factory.get()); 917 globals->system_http_transaction_factory.get());
917 918
918 return context; 919 return context;
919 } 920 }
920 921
921 // static 922 // static
922 void IOThread::ConfigureParamsFromFieldTrialsAndCommandLine( 923 void IOThread::ConfigureParamsFromFieldTrialsAndCommandLine(
923 const base::CommandLine& command_line, 924 const base::CommandLine& command_line,
924 bool is_quic_allowed_by_policy, 925 bool is_quic_allowed_by_policy,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 1053
1053 net::HttpNetworkSession::Params session_params(params); 1054 net::HttpNetworkSession::Params session_params(params);
1054 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents( 1055 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents(
1055 context, &session_params); 1056 context, &session_params);
1056 1057
1057 globals->proxy_script_fetcher_http_network_session.reset( 1058 globals->proxy_script_fetcher_http_network_session.reset(
1058 new net::HttpNetworkSession(session_params)); 1059 new net::HttpNetworkSession(session_params));
1059 globals->proxy_script_fetcher_http_transaction_factory.reset( 1060 globals->proxy_script_fetcher_http_transaction_factory.reset(
1060 new net::HttpNetworkLayer( 1061 new net::HttpNetworkLayer(
1061 globals->proxy_script_fetcher_http_network_session.get())); 1062 globals->proxy_script_fetcher_http_network_session.get()));
1063 context->set_name("proxy");
1062 context->set_http_transaction_factory( 1064 context->set_http_transaction_factory(
1063 globals->proxy_script_fetcher_http_transaction_factory.get()); 1065 globals->proxy_script_fetcher_http_transaction_factory.get());
1064 1066
1065 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory( 1067 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory(
1066 new net::URLRequestJobFactoryImpl()); 1068 new net::URLRequestJobFactoryImpl());
1067 1069
1068 job_factory->SetProtocolHandler(url::kDataScheme, 1070 job_factory->SetProtocolHandler(url::kDataScheme,
1069 base::MakeUnique<net::DataProtocolHandler>()); 1071 base::MakeUnique<net::DataProtocolHandler>());
1070 job_factory->SetProtocolHandler( 1072 job_factory->SetProtocolHandler(
1071 url::kFileScheme, 1073 url::kFileScheme,
(...skipping 14 matching lines...) Expand all
1086 1088
1087 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the 1089 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the
1088 // system URLRequestContext too. There's no reason this should be tied to a 1090 // system URLRequestContext too. There's no reason this should be tied to a
1089 // profile. 1091 // profile.
1090 return context; 1092 return context;
1091 } 1093 }
1092 1094
1093 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { 1095 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() {
1094 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); 1096 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread);
1095 } 1097 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/off_the_record_profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698