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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | net/socket/ssl_client_socket_openssl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 952964b1b79a7b16d32de582d06b4334a6b7086f..eda5dcaa41f661550a610ada1aa2cdd0f07a3f53 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -80,6 +80,9 @@
#include "net/quic/crypto/crypto_protocol.h"
#include "net/quic/quic_protocol.h"
#include "net/quic/quic_utils.h"
+#if defined(USE_OPENSSL)
+#include "net/socket/ssl_client_socket_openssl.h"
+#endif
#include "net/socket/tcp_client_socket.h"
#include "net/spdy/spdy_session.h"
#include "net/ssl/channel_id_service.h"
@@ -553,6 +556,16 @@ void IOThread::Init() {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kSSLKeyLogFile)) {
+ 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.
+ switches::kSSLKeyLogFile);
+ #if defined(USE_OPENSSL)
+ net::SSLClientSocketOpenSSL::SetSslKeyLogFile(switch_value);
+ #else
+ DVLOG(1) << "Platform does not support openssl";
+ #endif
+ }
+
DCHECK(!globals_);
globals_ = new Globals;
« 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