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-16 14:19:26 -0800
commite3edf5a0c8f1d68b83b51a3534f295bbca322267 (patch)
tree584ea50c4340a230f17ddcc78798dcc1e43c1d7e /Source/WebKit/android/WebCoreSupport
parent9d5e9234a371d13bf55a779a6257ae5e277bfb1b (diff)
downloadexternal_webkit-e3edf5a0c8f1d68b83b51a3534f295bbca322267.zip
external_webkit-e3edf5a0c8f1d68b83b51a3534f295bbca322267.tar.gz
external_webkit-e3edf5a0c8f1d68b83b51a3534f295bbca322267.tar.bz2
Clean cached trust state on system storage update.
Bug: 6009802 Cherry pick d61e19d1adc4e5fd664a3a5e5c0fd1141e697345. When credential storage is updated, reset any states in network layer that caches information. Change-Id: Iba4ea75723bbfab24c4ed3107fbaf5f7557c663b
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();