summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android
diff options
context:
space:
mode:
authorSelim Gurun <sgurun@google.com>2011-12-02 09:33:40 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-12-02 09:33:40 -0800
commit83d1ce9f7cc95d73e4e431e07dc090f261a9015f (patch)
tree4c9b055474ebbdb1e5f02cbe0c2ae14244201262 /Source/WebKit/android
parent1c0d76f672e284bf455bbdd7d0a51a904570b07c (diff)
parent17393d82fd683230373d65641b1eea02af17c0e2 (diff)
downloadexternal_webkit-83d1ce9f7cc95d73e4e431e07dc090f261a9015f.zip
external_webkit-83d1ce9f7cc95d73e4e431e07dc090f261a9015f.tar.gz
external_webkit-83d1ce9f7cc95d73e4e431e07dc090f261a9015f.tar.bz2
Merge "Fix init and cleanup of WebCookieJar."
Diffstat (limited to 'Source/WebKit/android')
-rw-r--r--Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp8
-rw-r--r--Source/WebKit/android/WebCoreSupport/WebCookieJar.h2
2 files changed, 2 insertions, 8 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp b/Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp
index b33cbc2..0af3cc2 100644
--- a/Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp
+++ b/Source/WebKit/android/WebCoreSupport/WebCookieJar.cpp
@@ -123,6 +123,7 @@ void WebCookieJar::cleanup(bool isPrivateBrowsing)
MutexLocker lock(instanceMutex);
scoped_refptr<WebCookieJar>* instancePtr = instance(isPrivateBrowsing);
*instancePtr = 0;
+ removeFileOrDirectory(databaseDirectory(isPrivateBrowsing).c_str());
}
WebCookieJar::WebCookieJar(const std::string& databaseFilePath)
@@ -130,10 +131,6 @@ WebCookieJar::WebCookieJar(const std::string& databaseFilePath)
, m_databaseFilePath(databaseFilePath)
, m_allowCookies(true) {}
-WebCookieJar::~WebCookieJar() {
- removeFileOrDirectory(m_databaseFilePath.c_str());
-}
-
void WebCookieJar::initCookieStore() {
MutexLocker lock(m_cookieStoreInitializeMutex);
if (m_cookieStoreInitialized)
@@ -183,8 +180,7 @@ int WebCookieJar::CanSetCookie(const GURL&, const GURL&, const std::string&) con
net::CookieStore* WebCookieJar::cookieStore()
{
- if (!m_cookieStoreInitialized)
- initCookieStore();
+ initCookieStore();
return m_cookieStore.get();
}
diff --git a/Source/WebKit/android/WebCoreSupport/WebCookieJar.h b/Source/WebKit/android/WebCoreSupport/WebCookieJar.h
index 25d9e78..7ade9d0 100644
--- a/Source/WebKit/android/WebCoreSupport/WebCookieJar.h
+++ b/Source/WebKit/android/WebCoreSupport/WebCookieJar.h
@@ -66,9 +66,7 @@ public:
int getNumCookiesInDatabase();
private:
- friend class base::RefCountedThreadSafe<WebCookieJar>;
WebCookieJar(const std::string& databaseFilePath);
- ~WebCookieJar();
void initCookieStore();
private: