diff options
author | Kristian Monsen <kristianm@google.com> | 2010-12-22 03:35:41 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-12-22 03:35:41 -0800 |
commit | b954c48e40c25750515eab62a316b8202a1bcbcc (patch) | |
tree | 5daffcfc4e7ee2bdb40bebbe3658b68e2d2213cb /WebKit/android/WebCoreSupport/WebRequestContext.cpp | |
parent | c0e46942841a3a1bea38d0eedb6bceb65c276d66 (diff) | |
parent | d531ae5ea94ec991d57dfa9cf8ab4de44ada92b8 (diff) | |
download | external_webkit-b954c48e40c25750515eab62a316b8202a1bcbcc.zip external_webkit-b954c48e40c25750515eab62a316b8202a1bcbcc.tar.gz external_webkit-b954c48e40c25750515eab62a316b8202a1bcbcc.tar.bz2 |
Merge "Adding a method to delete a WebCache"
Diffstat (limited to 'WebKit/android/WebCoreSupport/WebRequestContext.cpp')
-rw-r--r-- | WebKit/android/WebCoreSupport/WebRequestContext.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/WebKit/android/WebCoreSupport/WebRequestContext.cpp b/WebKit/android/WebCoreSupport/WebRequestContext.cpp index 99e44ec..e108e2a 100644 --- a/WebKit/android/WebCoreSupport/WebRequestContext.cpp +++ b/WebKit/android/WebCoreSupport/WebRequestContext.cpp @@ -52,6 +52,7 @@ WebRequestContext::WebRequestContext(bool isPrivateBrowsing) if (m_isPrivateBrowsing) { // Delete the old files if this is the first private browsing instance // They are probably leftovers from a power cycle + // We do not need to clear the cache as it is in memory only for private browsing if (!numPrivateBrowsingInstances) WebCookieJar::cleanup(true); numPrivateBrowsingInstances++; @@ -74,9 +75,11 @@ WebRequestContext::~WebRequestContext() if (m_isPrivateBrowsing) { numPrivateBrowsingInstances--; - // This is the last private browsing context, delete the cookies - if (!numPrivateBrowsingInstances) + // This is the last private browsing context, delete the cookies and cache + if (!numPrivateBrowsingInstances) { WebCookieJar::cleanup(true); + WebCache::cleanup(true); + } } } |