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

Side by Side Diff: components/cronet/ios/cronet_environment.cc

Issue 1904483004: Change SupportsSpdy dict, SpdySettingsMap, ServerNetworkStatsMap, AlternativeServiceMap and disk da… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile after sync code, introduced by commit 388755 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/cronet/ios/cronet_environment.h" 5 #include "components/cronet/ios/cronet_environment.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/atomicops.h" 10 #include "base/atomicops.h"
(...skipping 26 matching lines...) Expand all
37 #include "net/log/net_log.h" 37 #include "net/log/net_log.h"
38 #include "net/log/write_to_file_net_log_observer.h" 38 #include "net/log/write_to_file_net_log_observer.h"
39 #include "net/proxy/proxy_service.h" 39 #include "net/proxy/proxy_service.h"
40 #include "net/socket/ssl_client_socket.h" 40 #include "net/socket/ssl_client_socket.h"
41 #include "net/ssl/channel_id_service.h" 41 #include "net/ssl/channel_id_service.h"
42 #include "net/ssl/default_channel_id_store.h" 42 #include "net/ssl/default_channel_id_store.h"
43 #include "net/ssl/ssl_config_service_defaults.h" 43 #include "net/ssl/ssl_config_service_defaults.h"
44 #include "net/url_request/static_http_user_agent_settings.h" 44 #include "net/url_request/static_http_user_agent_settings.h"
45 #include "net/url_request/url_request_context_storage.h" 45 #include "net/url_request/url_request_context_storage.h"
46 #include "net/url_request/url_request_job_factory_impl.h" 46 #include "net/url_request/url_request_job_factory_impl.h"
47 #include "url/scheme_host_port.h"
47 #include "url/url_util.h" 48 #include "url/url_util.h"
48 49
49 namespace { 50 namespace {
50 51
51 base::AtExitManager* g_at_exit_ = nullptr; 52 base::AtExitManager* g_at_exit_ = nullptr;
52 net::NetworkChangeNotifier* g_network_change_notifier = nullptr; 53 net::NetworkChangeNotifier* g_network_change_notifier = nullptr;
53 // MessageLoop on the main thread. 54 // MessageLoop on the main thread.
54 base::MessageLoop* g_main_message_loop = nullptr; 55 base::MessageLoop* g_main_message_loop = nullptr;
55 56
56 #if USE_FAKE_CERT_VERIFIER 57 #if USE_FAKE_CERT_VERIFIER
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 params.http_auth_handler_factory = main_context_->http_auth_handler_factory(); 321 params.http_auth_handler_factory = main_context_->http_auth_handler_factory();
321 params.http_server_properties = main_context_->http_server_properties(); 322 params.http_server_properties = main_context_->http_server_properties();
322 params.net_log = main_context_->net_log(); 323 params.net_log = main_context_->net_log();
323 params.enable_http2 = http2_enabled(); 324 params.enable_http2 = http2_enabled();
324 params.parse_alternative_services = false; 325 params.parse_alternative_services = false;
325 params.enable_quic = quic_enabled(); 326 params.enable_quic = quic_enabled();
326 327
327 for (const auto& quic_hint : quic_hints_) { 328 for (const auto& quic_hint : quic_hints_) {
328 net::AlternativeService alternative_service(net::AlternateProtocol::QUIC, 329 net::AlternativeService alternative_service(net::AlternateProtocol::QUIC,
329 "", quic_hint.port()); 330 "", quic_hint.port());
330 331 url::SchemeHostPort quic_hint_server("https", quic_hint.host(),
332 quic_hint.port());
331 main_context_->http_server_properties()->SetAlternativeService( 333 main_context_->http_server_properties()->SetAlternativeService(
332 quic_hint, alternative_service, base::Time::Max()); 334 quic_hint_server, alternative_service, base::Time::Max());
333 params.quic_host_whitelist.insert(quic_hint.host()); 335 params.quic_host_whitelist.insert(quic_hint.host());
334 } 336 }
335 337
336 if (!params.channel_id_service) { 338 if (!params.channel_id_service) {
337 // The main context may not have a ChannelIDService, since it is lazily 339 // The main context may not have a ChannelIDService, since it is lazily
338 // constructed. If not, build an ephemeral ChannelIDService with no backing 340 // constructed. If not, build an ephemeral ChannelIDService with no backing
339 // disk store. 341 // disk store.
340 // TODO(ellyjones): support persisting ChannelID. 342 // TODO(ellyjones): support persisting ChannelID.
341 params.channel_id_service = 343 params.channel_id_service =
342 new net::ChannelIDService(new net::DefaultChannelIDStore(NULL), 344 new net::ChannelIDService(new net::DefaultChannelIDStore(NULL),
(...skipping 19 matching lines...) Expand all
362 const net::HttpUserAgentSettings* user_agent_settings = 364 const net::HttpUserAgentSettings* user_agent_settings =
363 main_context_->http_user_agent_settings(); 365 main_context_->http_user_agent_settings();
364 if (!user_agent_settings) { 366 if (!user_agent_settings) {
365 return nullptr; 367 return nullptr;
366 } 368 }
367 369
368 return user_agent_settings->GetUserAgent(); 370 return user_agent_settings->GetUserAgent();
369 } 371 }
370 372
371 } // namespace cronet 373 } // namespace cronet
OLDNEW
« no previous file with comments | « components/cronet/android/url_request_context_adapter.cc ('k') | content/browser/loader/resource_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698