From d61e19d1adc4e5fd664a3a5e5c0fd1141e697345 Mon Sep 17 00:00:00 2001 From: Selim Gurun Date: Tue, 14 Feb 2012 12:08:25 -0800 Subject: Clean cached trust state on system storage update. Bug: 6009802 When credential storage is updated, reset any states in network layer that caches information. Change-Id: I551cd84645e40991234b18801216907ae7ab6579 --- Source/WebKit/android/WebCoreSupport/WebCache.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'Source/WebKit/android/WebCoreSupport/WebCache.cpp') diff --git a/Source/WebKit/android/WebCoreSupport/WebCache.cpp b/Source/WebKit/android/WebCoreSupport/WebCache.cpp index 9b505ee..82e3b27 100644 --- a/Source/WebKit/android/WebCoreSupport/WebCache.cpp +++ b/Source/WebKit/android/WebCoreSupport/WebCache.cpp @@ -30,7 +30,7 @@ #include "WebCoreJni.h" #include "WebRequestContext.h" #include "WebUrlLoaderClient.h" - +#include "net/http/http_network_session.h" #include using namespace WTF; @@ -131,6 +131,21 @@ void WebCache::clear() thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(this, &WebCache::clearImpl)); } +void WebCache::certTrustChanged() +{ + base::Thread* thread = WebUrlLoaderClient::ioThread(); + if (thread) + thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(this, &WebCache::certTrustChangedImpl)); +} + +void WebCache::certTrustChangedImpl() +{ + net::HttpNetworkSession* session = m_cache->GetSession(); + if (session) + session->cert_verifier()->ClearCache(); + m_cache->CloseAllConnections(); +} + void WebCache::closeIdleConnections() { base::Thread* thread = WebUrlLoaderClient::ioThread(); -- cgit v1.1