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

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

Issue 1327763002: Cleanup: Remove some LOG(ERROR) in ServiceWorkerContextWrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f83be8cf29a02cd028fced8b1975af5c1af7b9c0..c28ece6ceceed91d5b18d42b203885e3384568c8 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -150,7 +150,6 @@ void ServiceWorkerContextWrapper::DeleteAndStartOver() {
// The context could be null due to system shutdown or restart failure. In
// either case, we should not have to recover the system, so just return
// here.
- LOG(ERROR) << "ServiceWorkerContextCore is no longer alive.";
return;
}
context_core_->DeleteAndStartOver(
@@ -196,7 +195,6 @@ void ServiceWorkerContextWrapper::RegisterServiceWorker(
return;
}
if (!context_core_.get()) {
nhiroki 2015/09/02 06:15:38 nit: How about removing ".get()" like line 149?
falken 2015/09/02 06:28:09 Done.
- LOG(ERROR) << "ServiceWorkerContextCore is no longer alive.";
BrowserThread::PostTask(
BrowserThread::IO,
FROM_HERE,
@@ -233,7 +231,6 @@ void ServiceWorkerContextWrapper::UnregisterServiceWorker(
return;
}
if (!context_core_.get()) {
- LOG(ERROR) << "ServiceWorkerContextCore is no longer alive.";
BrowserThread::PostTask(
BrowserThread::IO,
FROM_HERE,
@@ -254,10 +251,8 @@ void ServiceWorkerContextWrapper::UpdateRegistration(const GURL& pattern) {
pattern));
return;
}
- if (!context_core_.get()) {
- LOG(ERROR) << "ServiceWorkerContextCore is no longer alive.";
+ if (!context_core_.get())
return;
- }
context_core_->storage()->FindRegistrationForPattern(
net::SimplifyUrlForRequest(pattern),
base::Bind(&ServiceWorkerContextWrapper::DidFindRegistrationForUpdate,
@@ -275,7 +270,6 @@ void ServiceWorkerContextWrapper::StartServiceWorker(
return;
}
if (!context_core_.get()) {
- LOG(ERROR) << "ServiceWorkerContextCore is no longer alive.";
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(callback, SERVICE_WORKER_ERROR_ABORT));
return;
@@ -294,7 +288,6 @@ void ServiceWorkerContextWrapper::SimulateSkipWaiting(int64_t version_id) {
return;
}
if (!context_core_.get()) {
nhiroki 2015/09/02 06:15:38 nit: Can you remove {}?
falken 2015/09/02 06:28:09 Done.
- LOG(ERROR) << "ServiceWorkerContextCore is no longer alive.";
return;
}
ServiceWorkerVersion* version = GetLiveVersion(version_id);
@@ -332,7 +325,6 @@ void ServiceWorkerContextWrapper::GetAllOriginsInfo(
const GetUsageInfoCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!context_core_.get()) {
- LOG(ERROR) << "ServiceWorkerContextCore is no longer alive.";
BrowserThread::PostTask(
BrowserThread::IO,
FROM_HERE,
@@ -395,10 +387,8 @@ void ServiceWorkerContextWrapper::DidFindRegistrationForUpdate(
if (status != SERVICE_WORKER_OK)
return;
- if (!context_core_.get()) {
- LOG(ERROR) << "ServiceWorkerContextCore is no longer alive.";
+ if (!context_core_.get())
return;
- }
DCHECK(registration);
context_core_->UpdateServiceWorker(registration.get(),
true /* force_bypass_cache */);
@@ -420,7 +410,6 @@ void ServiceWorkerContextWrapper::DeleteForOrigin(
const ResultCallback& result) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!context_core_.get()) {
- LOG(ERROR) << "ServiceWorkerContextCore is no longer alive.";
BrowserThread::PostTask(
BrowserThread::IO,
FROM_HERE,
@@ -447,7 +436,6 @@ void ServiceWorkerContextWrapper::CheckHasServiceWorker(
return;
}
if (!context_core_.get()) {
- LOG(ERROR) << "ServiceWorkerContextCore is no longer alive.";
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(callback, false));
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698