diff options
-rw-r--r-- | WebKit/android/WebCoreSupport/WebCookieJar.cpp | 4 | ||||
-rw-r--r-- | WebKit/android/jni/CookieManager.cpp | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/WebKit/android/WebCoreSupport/WebCookieJar.cpp b/WebKit/android/WebCoreSupport/WebCookieJar.cpp index 6ed6fb6..d290b5a 100644 --- a/WebKit/android/WebCoreSupport/WebCookieJar.cpp +++ b/WebKit/android/WebCoreSupport/WebCookieJar.cpp @@ -149,7 +149,9 @@ void WebCookieJar::setAllowCookies(bool allow) int WebCookieJar::getNumCookiesInDatabase() { - return m_cookieDb ? m_cookieDb->GetCookieCount() : 0; + if (!m_cookieStore) + return 0; + return m_cookieStore->GetCookieMonster()->GetAllCookies().size(); } // From CookiePolicy in chromium diff --git a/WebKit/android/jni/CookieManager.cpp b/WebKit/android/jni/CookieManager.cpp index 553dc55..87c7fa8 100644 --- a/WebKit/android/jni/CookieManager.cpp +++ b/WebKit/android/jni/CookieManager.cpp @@ -83,13 +83,13 @@ static bool hasCookies(JNIEnv*, jobject) static void removeAllCookie(JNIEnv*, jobject) { #if USE(CHROME_NETWORK_STACK) - WebCookieJar::get(false)->cookieStore()->GetCookieMonster()->DeleteAllCreatedAfter(Time(), true); + WebCookieJar::get(false)->cookieStore()->GetCookieMonster()->DeleteAll(true); // This will lazily create a new private browsing context. However, if the // context doesn't already exist, there's no need to create it, as cookies // for such contexts are cleared up when we're done with them. // TODO: Consider adding an optimisation to not create the context if it // doesn't already exist. - WebCookieJar::get(true)->cookieStore()->GetCookieMonster()->DeleteAllCreatedAfter(Time(), true); + WebCookieJar::get(true)->cookieStore()->GetCookieMonster()->DeleteAll(true); // The Java code removes cookies directly from the backing database, so we do the same, // but with a NULL callback so it's asynchronous. |