Bug 1173467 P3 Pass private browsing flag into CacheStorage factory methods. r=ehsan

This commit is contained in:
Ben Kelly
2015-06-26 17:42:56 -07:00
parent da2f1cbe30
commit 07f9c978c2
5 changed files with 48 additions and 7 deletions

View File

@@ -54,9 +54,14 @@ CreateCacheStorage(nsIPrincipal* aPrincipal, ErrorResult& aRv,
sandbox.forget(aHolder);
}
// We assume private browsing is not enabled here. The ScriptLoader
// explicitly fails for private browsing so there should never be
// a service worker running in private browsing mode. Therefore if
// we are purging scripts or running a comparison algorithm we cannot
// be in private browing.
return CacheStorage::CreateOnMainThread(cache::CHROME_ONLY_NAMESPACE,
sandboxGlobalObject,
aPrincipal, aRv);
sandboxGlobalObject, aPrincipal,
false /* private browsing */, aRv);
}
class CompareManager;