summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/WebCoreSupport
diff options
context:
space:
mode:
authorSelim Gurun <sgurun@google.com>2012-02-14 12:08:25 -0800
committerSelim Gurun <sgurun@google.com>2012-02-15 10:05:32 -0800
commitd61e19d1adc4e5fd664a3a5e5c0fd1141e697345 (patch)
treecc0c93ac0e5cfca9d7d096dd54dcef30e3f85476 /Source/WebKit/android/WebCoreSupport
parent82921a8052f869822cbd9fb6d54750c480ac9054 (diff)
downloadexternal_webkit-d61e19d1adc4e5fd664a3a5e5c0fd1141e697345.zip
external_webkit-d61e19d1adc4e5fd664a3a5e5c0fd1141e697345.tar.gz
external_webkit-d61e19d1adc4e5fd664a3a5e5c0fd1141e697345.tar.bz2
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
Diffstat (limited to 'Source/WebKit/android/WebCoreSupport')
-rw-r--r--Source/WebKit/android/WebCoreSupport/WebCache.cpp17
-rw-r--r--Source/WebKit/android/WebCoreSupport/WebCache.h3
2 files changed, 18 insertions, 2 deletions
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 <wtf/text/CString.h>
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();
diff --git a/Source/WebKit/android/WebCoreSupport/WebCache.h b/Source/WebKit/android/WebCoreSupport/WebCache.h
index c3b623d..ad57d88 100644
--- a/Source/WebKit/android/WebCoreSupport/WebCache.h
+++ b/Source/WebKit/android/WebCoreSupport/WebCache.h
@@ -48,7 +48,7 @@ public:
net::HttpCache* cache() { return m_cache.get(); }
net::ProxyConfigServiceAndroid* proxy() { return m_proxyConfigService; }
void closeIdleConnections();
-
+ void certTrustChanged();
private:
WebCache(bool isPrivateBrowsing);
@@ -60,6 +60,7 @@ private:
// For closeIdleConnections
void closeIdleImpl();
+ void certTrustChangedImpl();
// For getEntry()
void getEntryImpl();