diff options
author | Kristian Monsen <kristianm@google.com> | 2011-01-17 08:20:51 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-17 08:20:51 -0800 |
commit | f42f297f9d1e499b6b54e6c73ddb46dbb4745ede (patch) | |
tree | bb1df5f78eb04c7bc7432bbea0e65950d1acb056 | |
parent | 2a72fb6cf823503e177d0ff93ee6fac5df9f19f8 (diff) | |
parent | e7b25f70239e5490aba9d2c65ffb67176eb76c0e (diff) | |
download | external_webkit-f42f297f9d1e499b6b54e6c73ddb46dbb4745ede.zip external_webkit-f42f297f9d1e499b6b54e6c73ddb46dbb4745ede.tar.gz external_webkit-f42f297f9d1e499b6b54e6c73ddb46dbb4745ede.tar.bz2 |
Merge "Fixing cookie CTS tests." into honeycomb
-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. |