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

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

Issue 2536723009: Make net::URLRequestContext a MemoryDumpProvider (Closed)
Patch Set: self review 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
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 1059
1059 net::HttpNetworkSession::Params session_params(params); 1060 net::HttpNetworkSession::Params session_params(params);
1060 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents( 1061 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents(
1061 context, &session_params); 1062 context, &session_params);
1062 1063
1063 globals->proxy_script_fetcher_http_network_session.reset( 1064 globals->proxy_script_fetcher_http_network_session.reset(
1064 new net::HttpNetworkSession(session_params)); 1065 new net::HttpNetworkSession(session_params));
1065 globals->proxy_script_fetcher_http_transaction_factory.reset( 1066 globals->proxy_script_fetcher_http_transaction_factory.reset(
1066 new net::HttpNetworkLayer( 1067 new net::HttpNetworkLayer(
1067 globals->proxy_script_fetcher_http_network_session.get())); 1068 globals->proxy_script_fetcher_http_network_session.get()));
1069 context->set_name("proxy");
1068 context->set_http_transaction_factory( 1070 context->set_http_transaction_factory(
1069 globals->proxy_script_fetcher_http_transaction_factory.get()); 1071 globals->proxy_script_fetcher_http_transaction_factory.get());
1070 1072
1071 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory( 1073 std::unique_ptr<net::URLRequestJobFactoryImpl> job_factory(
1072 new net::URLRequestJobFactoryImpl()); 1074 new net::URLRequestJobFactoryImpl());
1073 1075
1074 job_factory->SetProtocolHandler(url::kDataScheme, 1076 job_factory->SetProtocolHandler(url::kDataScheme,
1075 base::MakeUnique<net::DataProtocolHandler>()); 1077 base::MakeUnique<net::DataProtocolHandler>());
1076 job_factory->SetProtocolHandler( 1078 job_factory->SetProtocolHandler(
1077 url::kFileScheme, 1079 url::kFileScheme,
(...skipping 14 matching lines...) Expand all
1092 1094
1093 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the 1095 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the
1094 // system URLRequestContext too. There's no reason this should be tied to a 1096 // system URLRequestContext too. There's no reason this should be tied to a
1095 // profile. 1097 // profile.
1096 return context; 1098 return context;
1097 } 1099 }
1098 1100
1099 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { 1101 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() {
1100 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); 1102 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread);
1101 } 1103 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_io_data.cc » ('j') | chrome/browser/profiles/profile_io_data.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698