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

Unified Diff: android_webview/native/aw_contents.cc

Issue 235563005: Add client cert support to android_webview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: code review phase 3 Created 6 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index bde37b6821be0dd25df59896982b98011d88dfa8..44c93b8cd27fe8f567126b5c94a57f896cefb847 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -54,6 +54,7 @@
#include "content/public/common/renderer_preferences.h"
#include "content/public/common/ssl_status.h"
#include "jni/AwContents_jni.h"
+#include "net/cert/cert_database.h"
#include "net/cert/x509_certificate.h"
#include "third_party/skia/include/core/SkPicture.h"
#include "ui/base/l10n/l10n_util_android.h"
@@ -165,6 +166,11 @@ void OnIoThreadClientReady(content::RenderFrameHost* rfh) {
render_process_id, render_frame_id);
}
+void NotifyClientCertificatesChanged() {
+ DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ net::CertDatabase::GetInstance()->OnAndroidKeyStoreChanged();
+}
+
} // namespace
// static
@@ -1038,6 +1044,13 @@ void AwContents::SetExtraHeadersForUrl(JNIEnv* env, jobject obj,
extra_headers);
}
+void AwContents::ClearClientCertPreferences(JNIEnv* env, jobject obj) {
+ content::BrowserThread::PostTask(
+ BrowserThread::IO,
+ FROM_HERE,
+ base::Bind(&NotifyClientCertificatesChanged));
+}
+
void AwContents::SetJsOnlineProperty(JNIEnv* env,
jobject obj,
jboolean network_up) {

Powered by Google App Engine
This is Rietveld 408576698