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

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

Issue 1403863002: Enable exporting SSLKEYLOGFILE on Android w/ command line arguments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: openssl envrironment Created 5 years, 2 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 | « no previous file | chrome/common/chrome_switches.h » ('j') | net/socket/ssl_client_socket_openssl.h » ('J')
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 <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 #include "net/http/http_auth_filter.h" 73 #include "net/http/http_auth_filter.h"
74 #include "net/http/http_auth_handler_factory.h" 74 #include "net/http/http_auth_handler_factory.h"
75 #include "net/http/http_network_layer.h" 75 #include "net/http/http_network_layer.h"
76 #include "net/http/http_server_properties_impl.h" 76 #include "net/http/http_server_properties_impl.h"
77 #include "net/proxy/proxy_config_service.h" 77 #include "net/proxy/proxy_config_service.h"
78 #include "net/proxy/proxy_script_fetcher_impl.h" 78 #include "net/proxy/proxy_script_fetcher_impl.h"
79 #include "net/proxy/proxy_service.h" 79 #include "net/proxy/proxy_service.h"
80 #include "net/quic/crypto/crypto_protocol.h" 80 #include "net/quic/crypto/crypto_protocol.h"
81 #include "net/quic/quic_protocol.h" 81 #include "net/quic/quic_protocol.h"
82 #include "net/quic/quic_utils.h" 82 #include "net/quic/quic_utils.h"
83 #if defined(USE_OPENSSL)
84 #include "net/socket/ssl_client_socket_openssl.h"
85 #endif
83 #include "net/socket/tcp_client_socket.h" 86 #include "net/socket/tcp_client_socket.h"
84 #include "net/spdy/spdy_session.h" 87 #include "net/spdy/spdy_session.h"
85 #include "net/ssl/channel_id_service.h" 88 #include "net/ssl/channel_id_service.h"
86 #include "net/ssl/default_channel_id_store.h" 89 #include "net/ssl/default_channel_id_store.h"
87 #include "net/url_request/data_protocol_handler.h" 90 #include "net/url_request/data_protocol_handler.h"
88 #include "net/url_request/file_protocol_handler.h" 91 #include "net/url_request/file_protocol_handler.h"
89 #include "net/url_request/ftp_protocol_handler.h" 92 #include "net/url_request/ftp_protocol_handler.h"
90 #include "net/url_request/static_http_user_agent_settings.h" 93 #include "net/url_request/static_http_user_agent_settings.h"
91 #include "net/url_request/url_fetcher.h" 94 #include "net/url_request/url_fetcher.h"
92 #include "net/url_request/url_request_backoff_manager.h" 95 #include "net/url_request/url_request_backoff_manager.h"
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 #endif 549 #endif
547 550
548 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 551 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432
549 // is fixed. 552 // is fixed.
550 tracked_objects::ScopedTracker tracking_profile2( 553 tracked_objects::ScopedTracker tracking_profile2(
551 FROM_HERE_WITH_EXPLICIT_FUNCTION( 554 FROM_HERE_WITH_EXPLICIT_FUNCTION(
552 "466432 IOThread::InitAsync::CommandLineForCurrentProcess")); 555 "466432 IOThread::InitAsync::CommandLineForCurrentProcess"));
553 const base::CommandLine& command_line = 556 const base::CommandLine& command_line =
554 *base::CommandLine::ForCurrentProcess(); 557 *base::CommandLine::ForCurrentProcess();
555 558
559 if (command_line.HasSwitch(switches::kSSLKeyLogFile)) {
560 std::string switch_value = command_line.GetSwitchValueNative(
Bryan McQuade 2015/10/14 00:38:54 consider calling this ssl_key_log_file instead of
Zhongyi Shi 2015/10/15 00:26:52 Done.
561 switches::kSSLKeyLogFile);
562 #if defined(USE_OPENSSL)
563 net::SSLClientSocketOpenSSL::SetSslKeyLogFile(switch_value);
564 #else
565 DVLOG(1) << "Platform does not support openssl";
566 #endif
567 }
568
556 DCHECK(!globals_); 569 DCHECK(!globals_);
557 globals_ = new Globals; 570 globals_ = new Globals;
558 571
559 // Add an observer that will emit network change events to the ChromeNetLog. 572 // Add an observer that will emit network change events to the ChromeNetLog.
560 // Assuming NetworkChangeNotifier dispatches in FIFO order, we should be 573 // Assuming NetworkChangeNotifier dispatches in FIFO order, we should be
561 // logging the network change before other IO thread consumers respond to it. 574 // logging the network change before other IO thread consumers respond to it.
562 network_change_observer_.reset( 575 network_change_observer_.reset(
563 new LoggingNetworkChangeObserver(net_log_)); 576 new LoggingNetworkChangeObserver(net_log_));
564 577
565 // Setup the HistogramWatcher to run on the IO thread. 578 // Setup the HistogramWatcher to run on the IO thread.
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 globals->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); 1605 globals->proxy_script_fetcher_url_request_job_factory = job_factory.Pass();
1593 1606
1594 context->set_job_factory( 1607 context->set_job_factory(
1595 globals->proxy_script_fetcher_url_request_job_factory.get()); 1608 globals->proxy_script_fetcher_url_request_job_factory.get());
1596 1609
1597 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the 1610 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the
1598 // system URLRequestContext too. There's no reason this should be tied to a 1611 // system URLRequestContext too. There's no reason this should be tied to a
1599 // profile. 1612 // profile.
1600 return context; 1613 return context;
1601 } 1614 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | net/socket/ssl_client_socket_openssl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698