Loading core/java/android/webkit/CookieManager.java +17 −5 Original line number Original line Diff line number Diff line Loading @@ -98,6 +98,10 @@ public final class CookieManager { private boolean mAcceptCookie = true; private boolean mAcceptCookie = true; // TODO: Remove this if/when we permanently switch to the Chromium HTTP stack // http:/b/3118772 private static Boolean sUseChromiumHttpStack; /** /** * This contains a list of 2nd-level domains that aren't allowed to have * This contains a list of 2nd-level domains that aren't allowed to have * wildcards when combined with country-codes. For example: [.co.uk]. * wildcards when combined with country-codes. For example: [.co.uk]. Loading Loading @@ -257,6 +261,13 @@ public final class CookieManager { return sRef; return sRef; } } private static boolean useChromiumHttpStack() { if (sUseChromiumHttpStack == null) { sUseChromiumHttpStack = nativeUseChromiumHttpStack(); } return sUseChromiumHttpStack; } /** /** * Control whether cookie is enabled or disabled * Control whether cookie is enabled or disabled * @param accept TRUE if accept cookie * @param accept TRUE if accept cookie Loading Loading @@ -524,11 +535,11 @@ public final class CookieManager { * Remove all cookies * Remove all cookies */ */ public void removeAllCookie() { public void removeAllCookie() { // Clear cookies for the Chromium HTTP stack if (useChromiumHttpStack()) { nativeRemoveAllCookie(); nativeRemoveAllCookie(); // Clear cookies for the Android HTTP stack return; // TODO: Remove this if/when we permanently switch to the Chromium HTTP stack } // http:/b/3118772 final Runnable clearCache = new Runnable() { final Runnable clearCache = new Runnable() { public void run() { public void run() { synchronized(CookieManager.this) { synchronized(CookieManager.this) { Loading Loading @@ -1023,5 +1034,6 @@ public final class CookieManager { } } // Native functions // Native functions private static native boolean nativeUseChromiumHttpStack(); private static native void nativeRemoveAllCookie(); private static native void nativeRemoveAllCookie(); } } Loading
core/java/android/webkit/CookieManager.java +17 −5 Original line number Original line Diff line number Diff line Loading @@ -98,6 +98,10 @@ public final class CookieManager { private boolean mAcceptCookie = true; private boolean mAcceptCookie = true; // TODO: Remove this if/when we permanently switch to the Chromium HTTP stack // http:/b/3118772 private static Boolean sUseChromiumHttpStack; /** /** * This contains a list of 2nd-level domains that aren't allowed to have * This contains a list of 2nd-level domains that aren't allowed to have * wildcards when combined with country-codes. For example: [.co.uk]. * wildcards when combined with country-codes. For example: [.co.uk]. Loading Loading @@ -257,6 +261,13 @@ public final class CookieManager { return sRef; return sRef; } } private static boolean useChromiumHttpStack() { if (sUseChromiumHttpStack == null) { sUseChromiumHttpStack = nativeUseChromiumHttpStack(); } return sUseChromiumHttpStack; } /** /** * Control whether cookie is enabled or disabled * Control whether cookie is enabled or disabled * @param accept TRUE if accept cookie * @param accept TRUE if accept cookie Loading Loading @@ -524,11 +535,11 @@ public final class CookieManager { * Remove all cookies * Remove all cookies */ */ public void removeAllCookie() { public void removeAllCookie() { // Clear cookies for the Chromium HTTP stack if (useChromiumHttpStack()) { nativeRemoveAllCookie(); nativeRemoveAllCookie(); // Clear cookies for the Android HTTP stack return; // TODO: Remove this if/when we permanently switch to the Chromium HTTP stack } // http:/b/3118772 final Runnable clearCache = new Runnable() { final Runnable clearCache = new Runnable() { public void run() { public void run() { synchronized(CookieManager.this) { synchronized(CookieManager.this) { Loading Loading @@ -1023,5 +1034,6 @@ public final class CookieManager { } } // Native functions // Native functions private static native boolean nativeUseChromiumHttpStack(); private static native void nativeRemoveAllCookie(); private static native void nativeRemoveAllCookie(); } }