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

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

Issue 654823002: ServiceWorker: Convert ServiceWorkerDatabase::Status to string for logging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « content/browser/service_worker/service_worker_database.cc ('k') | 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_storage.cc
diff --git a/content/browser/service_worker/service_worker_storage.cc b/content/browser/service_worker/service_worker_storage.cc
index 54eacd657f51bf4593d953a1f8bdf61a97cf6656..63cb08df542d8e09271a876cc0abf9298bc07375 100644
--- a/content/browser/service_worker/service_worker_storage.cc
+++ b/content/browser/service_worker/service_worker_storage.cc
@@ -778,7 +778,7 @@ void ServiceWorkerStorage::DidFindRegistrationForDocument(
"ServiceWorker",
"ServiceWorkerStorage::FindRegistrationForDocument",
base::Hash(document_url.spec()),
- "Status", "OK");
+ "Status", ServiceWorkerDatabase::StatusToString(status));
return;
}
@@ -786,14 +786,16 @@ void ServiceWorkerStorage::DidFindRegistrationForDocument(
// Look for something currently being installed.
scoped_refptr<ServiceWorkerRegistration> installing_registration =
FindInstallingRegistrationForDocument(document_url);
- callback.Run(installing_registration.get() ? SERVICE_WORKER_OK
- : SERVICE_WORKER_ERROR_NOT_FOUND,
- installing_registration);
- TRACE_EVENT_ASYNC_END1(
+ ServiceWorkerStatusCode installing_status = installing_registration.get() ?
+ SERVICE_WORKER_OK : SERVICE_WORKER_ERROR_NOT_FOUND;
+ callback.Run(installing_status, installing_registration);
+ TRACE_EVENT_ASYNC_END2(
"ServiceWorker",
"ServiceWorkerStorage::FindRegistrationForDocument",
base::Hash(document_url.spec()),
- "Status", status);
+ "Status", ServiceWorkerDatabase::StatusToString(status),
+ "Found installing registration",
+ installing_status == SERVICE_WORKER_OK);
nhiroki 2014/10/16 04:21:07 It seems more natural that "Status" value correspo
shimazu 2014/10/16 09:01:53 This looks good! I fixed it.
nhiroki 2014/10/16 09:20:51 Oops... sorry, I meant |ServiceWorkerStatusToStrin
shimazu 2014/10/17 01:54:46 I think "Found/Not Found" is better than |ServiceW
nhiroki 2014/10/17 03:24:02 (This comment is based on patchset 4) Hmm... I gu
return;
}
@@ -804,7 +806,7 @@ void ServiceWorkerStorage::DidFindRegistrationForDocument(
"ServiceWorker",
"ServiceWorkerStorage::FindRegistrationForDocument",
base::Hash(document_url.spec()),
- "Status", status);
+ "Status", ServiceWorkerDatabase::StatusToString(status));
}
void ServiceWorkerStorage::DidFindRegistrationForPattern(
« no previous file with comments | « content/browser/service_worker/service_worker_database.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698