FileDocCategorySizeDatePackage
CookieManagerAdapter.javaAPI DocAndroid 5.1 API4991Thu Mar 12 22:22:56 GMT 2015com.android.webview.chromium

CookieManagerAdapter

public class CookieManagerAdapter extends android.webkit.CookieManager

Fields Summary
private static final String
LOGTAG
org.chromium.android_webview.AwCookieManager
mChromeCookieManager
Constructors Summary
public CookieManagerAdapter(org.chromium.android_webview.AwCookieManager chromeCookieManager)


       
        mChromeCookieManager = chromeCookieManager;
    
Methods Summary
public synchronized booleanacceptCookie()

        return mChromeCookieManager.acceptCookie();
    
public synchronized booleanacceptThirdPartyCookies(android.webkit.WebView webView)

        return webView.getSettings().getAcceptThirdPartyCookies();
    
protected booleanallowFileSchemeCookiesImpl()

        return mChromeCookieManager.allowFileSchemeCookies();
    
private static java.lang.StringfixupUrl(java.lang.String url)

        // WebAddress is a private API in the android framework and a "quirk"
        // of the Classic WebView implementation that allowed embedders to
        // be relaxed about what URLs they passed into the CookieManager, so we
        // do the same normalisation before entering the chromium stack.
        return new WebAddress(url).toString();
    
public voidflush()

        mChromeCookieManager.flushCookieStore();
    
public synchronized java.lang.StringgetCookie(android.net.WebAddress uri)
IMPORTANT: This override is required for compatibility with the API 21 version of {@link CookieManager}.

        return mChromeCookieManager.getCookie(uri.toString());
    
public java.lang.StringgetCookie(java.lang.String url)

        try {
            return mChromeCookieManager.getCookie(fixupUrl(url));
        } catch (ParseException e) {
            Log.e(LOGTAG, "Unable to get cookies due to error parsing URL: " + url, e);
            return null;
        }
    
public java.lang.StringgetCookie(java.lang.String url, boolean privateBrowsing)

        return getCookie(url);
    
public synchronized booleanhasCookies()

        return mChromeCookieManager.hasCookies();
    
public synchronized booleanhasCookies(boolean privateBrowsing)

        return mChromeCookieManager.hasCookies();
    
public voidremoveAllCookie()

        mChromeCookieManager.removeAllCookies();
    
public voidremoveAllCookies(android.webkit.ValueCallback callback)

        mChromeCookieManager.removeAllCookies(callback);
    
public voidremoveExpiredCookie()

        mChromeCookieManager.removeExpiredCookie();
    
public voidremoveSessionCookie()

        mChromeCookieManager.removeSessionCookies();
    
public voidremoveSessionCookies(android.webkit.ValueCallback callback)

        mChromeCookieManager.removeSessionCookies(callback);
    
public synchronized voidsetAcceptCookie(boolean accept)

        mChromeCookieManager.setAcceptCookie(accept);
    
protected voidsetAcceptFileSchemeCookiesImpl(boolean accept)

        mChromeCookieManager.setAcceptFileSchemeCookies(accept);
    
public synchronized voidsetAcceptThirdPartyCookies(android.webkit.WebView webView, boolean accept)

        webView.getSettings().setAcceptThirdPartyCookies(accept);
    
public voidsetCookie(java.lang.String url, java.lang.String value)

        try {
            mChromeCookieManager.setCookie(fixupUrl(url), value);
        } catch (ParseException e) {
            Log.e(LOGTAG, "Not setting cookie due to error parsing URL: " + url, e);
        }
    
public voidsetCookie(java.lang.String url, java.lang.String value, android.webkit.ValueCallback callback)

        try {
            mChromeCookieManager.setCookie(fixupUrl(url), value, callback);
        } catch (ParseException e) {
            Log.e(LOGTAG, "Not setting cookie due to error parsing URL: " + url, e);
        }