diff options
author | miguelg <miguelg@chromium.org> | 2015-11-02 11:15:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-02 19:16:31 +0000 |
commit | 9ac06e400d90dd225ce20262a1bd4c40dd893707 (patch) | |
tree | ca8d41fc55d209c03c64879f5c3b4f71897f02e7 | |
parent | cca19173f891818b701562ca4e738a27bf3f619d (diff) | |
download | chromium_src-9ac06e400d90dd225ce20262a1bd4c40dd893707.zip chromium_src-9ac06e400d90dd225ce20262a1bd4c40dd893707.tar.gz chromium_src-9ac06e400d90dd225ce20262a1bd4c40dd893707.tar.bz2 |
Tune log statements to track stale notification issues
https://codereview.chromium.org/1408983003 introduce some logging which
has helped us narrow down where the problem is happening. This new
iteration moves the log statements to a more specific location to
proceed with the investigation.
BUG=534537
Review URL: https://codereview.chromium.org/1420133006
Cr-Commit-Position: refs/heads/master@{#357398}
-rw-r--r-- | content/browser/notifications/notification_event_dispatcher_impl.cc | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/content/browser/notifications/notification_event_dispatcher_impl.cc b/content/browser/notifications/notification_event_dispatcher_impl.cc index 538f344..a116648 100644 --- a/content/browser/notifications/notification_event_dispatcher_impl.cc +++ b/content/browser/notifications/notification_event_dispatcher_impl.cc @@ -82,18 +82,17 @@ void DispatchNotificationClickEventOnRegistration( const scoped_refptr<ServiceWorkerRegistration>& service_worker_registration) { DCHECK_CURRENTLY_ON(BrowserThread::IO); - if (service_worker_status == SERVICE_WORKER_OK) { - base::Callback<void(ServiceWorkerStatusCode)> dispatch_event_callback = - base::Bind(&NotificationClickEventFinished, - dispatch_complete_callback, - service_worker_registration); - #if defined(OS_ANDROID) // This LOG(INFO) deliberately exists to help track down the cause of // https://crbug.com/534537, where notifications sometimes do not react to // the user clicking on them. It should be removed once that's fixed. - LOG(INFO) << "Dispatching notificationclick event to the Service Worker."; + LOG(INFO) << "Trying to dispatch notification for SW with status: " + << service_worker_status << " action_index: " << action_index; #endif + if (service_worker_status == SERVICE_WORKER_OK) { + base::Callback<void(ServiceWorkerStatusCode)> dispatch_event_callback = + base::Bind(&NotificationClickEventFinished, dispatch_complete_callback, + service_worker_registration); DCHECK(service_worker_registration->active_version()); service_worker_registration->active_version()-> @@ -150,6 +149,14 @@ void FindServiceWorkerRegistration( bool success, const NotificationDatabaseData& notification_database_data) { DCHECK_CURRENTLY_ON(BrowserThread::IO); + +#if defined(OS_ANDROID) + // This LOG(INFO) deliberately exists to help track down the cause of + // https://crbug.com/534537, where notifications sometimes do not react to + // the user clicking on them. It should be removed once that's fixed. + LOG(INFO) << "Lookup for ServiceWoker Registration: sucesss:" << success + << " action_index: " << action_index; +#endif if (!success) { BrowserThread::PostTask( BrowserThread::UI, |