summaryrefslogtreecommitdiffstats
path: root/core/java/android/webkit/CookieSyncManager.java
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-02-16 17:49:31 +0000
committerSteve Block <steveblock@google.com>2012-02-22 17:21:43 +0000
commit0acb1c32fa002a648c8090f622b0094f406d5411 (patch)
treed064c945461791456a4609ca7995acffbd1d263d /core/java/android/webkit/CookieSyncManager.java
parent1e17ecae25c8b56db6d168851b858aa3ef9a3b6a (diff)
downloadframeworks_base-0acb1c32fa002a648c8090f622b0094f406d5411.zip
frameworks_base-0acb1c32fa002a648c8090f622b0094f406d5411.tar.gz
frameworks_base-0acb1c32fa002a648c8090f622b0094f406d5411.tar.bz2
Drop support for Android HTTP stack
All future releases will use the Chromium HTTP stack and maintaining two HTTP stacks adds maintenance overhead. The Chromium HTTP stack requires V8, but we now use V8 in all build targets (b/5495373), so we can safely drop the Android HTTP stack. LoadListener, HttpAuthHandlerImpl, Network, SslErrorHandlerImpl, WebViewWorker - Android-stack specific, removed StreamLoader, FrameLoader - Require LoadListener, removed CacheLoader, ContentLoader, DataLoader, FileLoader - Extend StreamLoader, removed BrowserFrame - Removed methods that create LoadListener - BrowserFrame.startLoadingResource() is called from native CallbackProxy, WebView - Removed calls to Network methods CacheManager, CookieManager, CookieSyncManager, WebViewCore, WebResourceResponse - Removed other Android-stack specific code JniUtlil - Removed useChromiumHttpStack() WebViewDatabase - Removed all code to create cookies and cache databases for Android HTTP stack See corresponding WebKit change https://android-git.corp.google.com/g/166327. Bug: 5495616 Change-Id: If491675516f6eb187077af4220214bb6e6a8d045
Diffstat (limited to 'core/java/android/webkit/CookieSyncManager.java')
-rw-r--r--core/java/android/webkit/CookieSyncManager.java101
1 files changed, 1 insertions, 100 deletions
diff --git a/core/java/android/webkit/CookieSyncManager.java b/core/java/android/webkit/CookieSyncManager.java
index a699800..19fa096 100644
--- a/core/java/android/webkit/CookieSyncManager.java
+++ b/core/java/android/webkit/CookieSyncManager.java
@@ -100,77 +100,6 @@ public final class CookieSyncManager extends WebSyncManager {
return sRef;
}
- /**
- * Package level api, called from CookieManager. Get all the cookies which
- * matches a given base domain.
- * @param domain
- * @return A list of Cookie
- */
- ArrayList<Cookie> getCookiesForDomain(String domain) {
- // null mDataBase implies that the host application doesn't support
- // persistent cookie. No sync needed.
- if (mDataBase == null) {
- return new ArrayList<Cookie>();
- }
-
- return mDataBase.getCookiesForDomain(domain);
- }
-
- /**
- * Package level api, called from CookieManager Clear all cookies in the
- * database
- */
- void clearAllCookies() {
- // null mDataBase implies that the host application doesn't support
- // persistent cookie.
- if (mDataBase == null) {
- return;
- }
-
- mDataBase.clearCookies();
- }
-
- /**
- * Returns true if there are any saved cookies.
- */
- boolean hasCookies() {
- // null mDataBase implies that the host application doesn't support
- // persistent cookie.
- if (mDataBase == null) {
- return false;
- }
-
- return mDataBase.hasCookies();
- }
-
- /**
- * Package level api, called from CookieManager Clear all session cookies in
- * the database
- */
- void clearSessionCookies() {
- // null mDataBase implies that the host application doesn't support
- // persistent cookie.
- if (mDataBase == null) {
- return;
- }
-
- mDataBase.clearSessionCookies();
- }
-
- /**
- * Package level api, called from CookieManager Clear all expired cookies in
- * the database
- */
- void clearExpiredCookies(long now) {
- // null mDataBase implies that the host application doesn't support
- // persistent cookie.
- if (mDataBase == null) {
- return;
- }
-
- mDataBase.clearExpiredCookies(now);
- }
-
protected void syncFromRamToFlash() {
if (DebugFlags.COOKIE_SYNC_MANAGER) {
Log.v(LOGTAG, "CookieSyncManager::syncFromRamToFlash STARTS");
@@ -182,41 +111,13 @@ public final class CookieSyncManager extends WebSyncManager {
return;
}
- if (JniUtil.useChromiumHttpStack()) {
- manager.flushCookieStore();
- } else {
- ArrayList<Cookie> cookieList = manager.getUpdatedCookiesSince(mLastUpdate);
- mLastUpdate = System.currentTimeMillis();
- syncFromRamToFlash(cookieList);
-
- ArrayList<Cookie> lruList = manager.deleteLRUDomain();
- syncFromRamToFlash(lruList);
- }
+ manager.flushCookieStore();
if (DebugFlags.COOKIE_SYNC_MANAGER) {
Log.v(LOGTAG, "CookieSyncManager::syncFromRamToFlash DONE");
}
}
- private void syncFromRamToFlash(ArrayList<Cookie> list) {
- Iterator<Cookie> iter = list.iterator();
- while (iter.hasNext()) {
- Cookie cookie = iter.next();
- if (cookie.mode != Cookie.MODE_NORMAL) {
- if (cookie.mode != Cookie.MODE_NEW) {
- mDataBase.deleteCookies(cookie.domain, cookie.path,
- cookie.name);
- }
- if (cookie.mode != Cookie.MODE_DELETED) {
- mDataBase.addCookie(cookie);
- CookieManager.getInstance().syncedACookie(cookie);
- } else {
- CookieManager.getInstance().deleteACookie(cookie);
- }
- }
- }
- }
-
private static void checkInstanceIsCreated() {
if (sRef == null) {
throw new IllegalStateException(