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

Commit 0f868ca0 authored by Iain Merrick's avatar Iain Merrick
Browse files

Disable CacheManager when using the Chrome HTTP stack.

Currently, cacheDisabled() reports false, but no files are ever
added to the cache. This CL makes the framework more honest and
reports that the cache is disabled.

BUG=3270236

Change-Id: I13c0291ac295d965f71f1e70dbdebc74b95ddce0
parent d1281286
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -181,6 +181,11 @@ public final class CacheManager {
            removeAllCacheFiles();
            mClearCacheOnInit = false;
        }
        // If we're using the Chrome HTTP stack, disable the cache.
        // Chrome has its own cache, and we don't provide programmatic access to it.
        if (JniUtil.useChromiumHttpStack()) {
            setCacheDisabled(true);
        }
    }
    
    /**
@@ -233,6 +238,10 @@ public final class CacheManager {
        if (mDisabled) {
            removeAllCacheFiles();
        }
        if (!mDisabled && JniUtil.useChromiumHttpStack()) {
            Log.w(LOGTAG, "CacheManager enabled, but it will not work as "
                    + "expected because the Chrome HTTP stack is in use.");
        }
    }

    /**