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

Unified Diff: android_webview/native/aw_contents_client_bridge.cc

Issue 427673006: disable WebView SSL exception when command line flag ignore-certificate-errors is given (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_contents_client_bridge.cc
diff --git a/android_webview/native/aw_contents_client_bridge.cc b/android_webview/native/aw_contents_client_bridge.cc
index 5431be749a6302a14e7762d752257d4e648ba6c7..3813565672bbc5bbbccc953918fbaeff285c4f68 100644
--- a/android_webview/native/aw_contents_client_bridge.cc
+++ b/android_webview/native/aw_contents_client_bridge.cc
@@ -10,10 +10,12 @@
#include "base/android/jni_array.h"
#include "base/android/jni_string.h"
#include "base/callback_helpers.h"
+#include "base/command_line.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/content_switches.h"
#include "crypto/scoped_openssl_types.h"
#include "jni/AwContentsClientBridge_jni.h"
#include "net/android/keystore_openssl.h"
@@ -106,6 +108,10 @@ void AwContentsClientBridge::ProceedSslError(JNIEnv* env, jobject obj,
if (!callback || callback->is_null()) {
LOG(WARNING) << "Ignoring unexpected ssl error proceed callback";
return;
+ } else if (CommandLine::ForCurrentProcess()->HasSwitch(
mnaganov (inactive) 2014/07/29 08:24:48 It looks like you'll end up with error callbacks p
+ switches::kIgnoreCertificateErrors)) {
+ LOG(WARNING) << "Ignoring unexpected ssl error due to command line flag";
+ return;
}
callback->Run(proceed);
pending_cert_error_callbacks_.Remove(id);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698