Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5ac9de4 authored by Steve Block's avatar Steve Block
Browse files

Hook up CookieManager.acceptCookie() and setAcceptCookie() for the Chromium HTTP stack

Also requires a change to external/webkit ...
https://android-git.corp.google.com/g/76066

Bug: 3116410
Change-Id: If8562468708e7d68c5be53db3860647687ebf3bd
parent 82d98161
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -273,6 +273,11 @@ public final class CookieManager {
     * @param accept TRUE if accept cookie
     */
    public synchronized void setAcceptCookie(boolean accept) {
        if (useChromiumHttpStack()) {
            nativeSetAcceptCookie(accept);
            return;
        }

        mAcceptCookie = accept;
    }

@@ -281,6 +286,10 @@ public final class CookieManager {
     * @return TRUE if accept cookie
     */
    public synchronized boolean acceptCookie() {
        if (useChromiumHttpStack()) {
            return nativeAcceptCookie();
        }

        return mAcceptCookie;
    }

@@ -1035,5 +1044,7 @@ public final class CookieManager {

    // Native functions
    private static native boolean nativeUseChromiumHttpStack();
    private static native boolean nativeAcceptCookie();
    private static native void nativeRemoveAllCookie();
    private static native void nativeSetAcceptCookie(boolean accept);
}