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

Unified Diff: content/child/service_worker/service_worker_dispatcher.cc

Issue 603863002: SW: Move TRACE_EVENT_ASYNC_END to avoid early return and fix typo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/embedded_worker_instance.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/service_worker/service_worker_dispatcher.cc
diff --git a/content/child/service_worker/service_worker_dispatcher.cc b/content/child/service_worker/service_worker_dispatcher.cc
index 4ebb9edbb32c82f87153e4f4c71ba970d9b61b4c..58ee1e645fccae8678d3bd9e5fce2fe5c9405dd2 100644
--- a/content/child/service_worker/service_worker_dispatcher.cc
+++ b/content/child/service_worker/service_worker_dispatcher.cc
@@ -109,7 +109,7 @@ void ServiceWorkerDispatcher::RegisterServiceWorker(
TRACE_EVENT_ASYNC_BEGIN2("ServiceWorker",
"ServiceWorkerDispatcher::RegisterServiceWorker",
request_id,
- "Pettern", pattern.spec(),
+ "Pattern", pattern.spec(),
nhiroki 2014/09/25 05:51:42 "Pattern" is no longer used in the spec, so can yo
shimazu 2014/09/25 07:02:46 Done.
"Script URL", script_url.spec());
thread_safe_sender_->Send(new ServiceWorkerHostMsg_RegisterServiceWorker(
CurrentWorkerId(), request_id, provider_id, pattern, script_url));
@@ -134,7 +134,7 @@ void ServiceWorkerDispatcher::UnregisterServiceWorker(
TRACE_EVENT_ASYNC_BEGIN1("ServiceWorker",
"ServiceWorkerDispatcher::UnregisterServiceWorker",
request_id,
- "Pettern", pattern.spec());
+ "Pattern", pattern.spec());
nhiroki 2014/09/25 05:51:42 ditto.
shimazu 2014/09/25 07:02:47 Done.
thread_safe_sender_->Send(new ServiceWorkerHostMsg_UnregisterServiceWorker(
CurrentWorkerId(), request_id, provider_id, pattern));
}
@@ -325,6 +325,9 @@ void ServiceWorkerDispatcher::OnRegistered(
"ServiceWorkerDispatcher::RegisterServiceWorker",
request_id,
"OnRegistered");
+ TRACE_EVENT_ASYNC_END0("ServiceWorker",
+ "ServiceWorkerDispatcher::RegisterServiceWorker",
+ request_id);
WebServiceWorkerRegistrationCallbacks* callbacks =
pending_registration_callbacks_.Lookup(request_id);
DCHECK(callbacks);
@@ -333,9 +336,6 @@ void ServiceWorkerDispatcher::OnRegistered(
callbacks->onSuccess(FindOrCreateRegistration(info, attrs));
pending_registration_callbacks_.Remove(request_id);
- TRACE_EVENT_ASYNC_END0("ServiceWorker",
- "ServiceWorkerDispatcher::RegisterServiceWorker",
- request_id);
}
void ServiceWorkerDispatcher::OnUnregistered(int thread_id,
@@ -348,14 +348,14 @@ void ServiceWorkerDispatcher::OnUnregistered(int thread_id,
"ServiceWorkerDispatcher::UnregisterServiceWorker",
request_id,
"OnUnregistered");
+ TRACE_EVENT_ASYNC_END0("ServiceWorker",
+ "ServiceWorkerDispatcher::UnregisterServiceWorker",
+ request_id);
nhiroki 2014/09/25 05:51:42 nit: OnUnregistered calls functions as follows:
shimazu 2014/09/25 07:02:47 Done.
DCHECK(callbacks);
if (!callbacks)
return;
callbacks->onSuccess(&is_success);
pending_unregistration_callbacks_.Remove(request_id);
- TRACE_EVENT_ASYNC_END0("ServiceWorker",
- "ServiceWorkerDispatcher::UnregisterServiceWorker",
- request_id);
}
void ServiceWorkerDispatcher::OnDidGetRegistration(
@@ -370,6 +370,9 @@ void ServiceWorkerDispatcher::OnDidGetRegistration(
"ServiceWorkerDispatcher::GetRegistration",
request_id,
"OnDidGetRegistration");
+ TRACE_EVENT_ASYNC_END0("ServiceWorker",
+ "ServiceWorkerDispatcher::GetRegistration",
+ request_id);
DCHECK(callbacks);
if (!callbacks)
return;
@@ -380,9 +383,6 @@ void ServiceWorkerDispatcher::OnDidGetRegistration(
callbacks->onSuccess(registration);
pending_get_registration_callbacks_.Remove(request_id);
- TRACE_EVENT_ASYNC_END0("ServiceWorker",
- "ServiceWorkerDispatcher::GetRegistration",
- request_id);
}
void ServiceWorkerDispatcher::OnRegistrationError(
@@ -419,6 +419,9 @@ void ServiceWorkerDispatcher::OnUnregistrationError(
"ServiceWorkerDispatcher::UnregisterServiceWorker",
request_id,
"OnUnregistrationError");
+ TRACE_EVENT_ASYNC_END0("ServiceWorker",
+ "ServiceWorkerDispatcher::UnregisterServiceWorker",
+ request_id);
WebServiceWorkerUnregistrationCallbacks* callbacks =
pending_unregistration_callbacks_.Lookup(request_id);
DCHECK(callbacks);
@@ -429,9 +432,6 @@ void ServiceWorkerDispatcher::OnUnregistrationError(
new WebServiceWorkerError(error_type, message));
callbacks->onError(error.release());
pending_unregistration_callbacks_.Remove(request_id);
- TRACE_EVENT_ASYNC_END0("ServiceWorker",
- "ServiceWorkerDispatcher::UnregisterServiceWorker",
- request_id);
}
void ServiceWorkerDispatcher::OnGetRegistrationError(
@@ -446,6 +446,9 @@ void ServiceWorkerDispatcher::OnGetRegistrationError(
"OnGetRegistrationError");
WebServiceWorkerGetRegistrationCallbacks* callbacks =
pending_get_registration_callbacks_.Lookup(request_id);
+ TRACE_EVENT_ASYNC_END0("ServiceWorker",
+ "ServiceWorkerDispatcher::GetRegistration",
+ request_id);
DCHECK(callbacks);
if (!callbacks)
return;
@@ -454,9 +457,6 @@ void ServiceWorkerDispatcher::OnGetRegistrationError(
new WebServiceWorkerError(error_type, message));
callbacks->onError(error.release());
pending_get_registration_callbacks_.Remove(request_id);
- TRACE_EVENT_ASYNC_END0("ServiceWorker",
- "ServiceWorkerDispatcher::GetRegistration",
- request_id);
}
void ServiceWorkerDispatcher::OnServiceWorkerStateChanged(
« no previous file with comments | « content/browser/service_worker/embedded_worker_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698