Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: content/browser/service_worker/service_worker_context_wrapper.cc

Issue 2751343002: Adds a basic offline check to InstallableManager. (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/service_worker/service_worker_context_wrapper.cc
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index 9f3c72b8787f2f9e5b04527faa9731b2e5573343..62068edd0669953a3262fce82e283b394aa0ac8c 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -481,11 +481,11 @@ void ServiceWorkerContextWrapper::DidGetAllRegistrationsForGetAllOrigins(
void ServiceWorkerContextWrapper::DidCheckHasServiceWorker(
const CheckHasServiceWorkerCallback& callback,
- bool has_service_worker) {
+ ServiceWorkerCapability capability) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(callback, has_service_worker));
+ base::Bind(callback, capability));
}
void ServiceWorkerContextWrapper::StopAllServiceWorkersForOrigin(
@@ -570,8 +570,9 @@ void ServiceWorkerContextWrapper::CheckHasServiceWorker(
return;
}
if (!context_core_) {
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(callback, false));
+ BrowserThread::PostTask(
+ BrowserThread::UI, FROM_HERE,
+ base::Bind(callback, ServiceWorkerCapability::NO_SERVICE_WORKER));
return;
}
context()->CheckHasServiceWorker(
« no previous file with comments | « content/browser/service_worker/service_worker_context_wrapper.h ('k') | content/public/browser/service_worker_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698