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

Side by Side Diff: content/browser/notifications/notification_event_dispatcher_impl.cc

Issue 962543005: Service Worker: Add metrics and timeout for starting a Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync again Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/push_messaging/push_messaging_message_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/notifications/notification_event_dispatcher_impl.h" 5 #include "content/browser/notifications/notification_event_dispatcher_impl.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "content/browser/service_worker/service_worker_context_wrapper.h" 8 #include "content/browser/service_worker/service_worker_context_wrapper.h"
9 #include "content/browser/service_worker/service_worker_registration.h" 9 #include "content/browser/service_worker/service_worker_registration.h"
10 #include "content/browser/service_worker/service_worker_storage.h" 10 #include "content/browser/service_worker/service_worker_storage.h"
(...skipping 29 matching lines...) Expand all
40 case SERVICE_WORKER_ERROR_START_WORKER_FAILED: 40 case SERVICE_WORKER_ERROR_START_WORKER_FAILED:
41 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND: 41 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND:
42 case SERVICE_WORKER_ERROR_NOT_FOUND: 42 case SERVICE_WORKER_ERROR_NOT_FOUND:
43 case SERVICE_WORKER_ERROR_EXISTS: 43 case SERVICE_WORKER_ERROR_EXISTS:
44 case SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED: 44 case SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED:
45 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED: 45 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED:
46 case SERVICE_WORKER_ERROR_IPC_FAILED: 46 case SERVICE_WORKER_ERROR_IPC_FAILED:
47 case SERVICE_WORKER_ERROR_NETWORK: 47 case SERVICE_WORKER_ERROR_NETWORK:
48 case SERVICE_WORKER_ERROR_SECURITY: 48 case SERVICE_WORKER_ERROR_SECURITY:
49 case SERVICE_WORKER_ERROR_STATE: 49 case SERVICE_WORKER_ERROR_STATE:
50 case SERVICE_WORKER_ERROR_TIMEOUT:
51 case SERVICE_WORKER_ERROR_MAX_VALUE:
50 status = PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR; 52 status = PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR;
51 break; 53 break;
52 } 54 }
53 55
54 BrowserThread::PostTask(BrowserThread::UI, 56 BrowserThread::PostTask(BrowserThread::UI,
55 FROM_HERE, 57 FROM_HERE,
56 base::Bind(dispatch_complete_callback, status)); 58 base::Bind(dispatch_complete_callback, status));
57 } 59 }
58 60
59 // Dispatches the notificationclick on |service_worker_registration| if the 61 // Dispatches the notificationclick on |service_worker_registration| if the
(...skipping 28 matching lines...) Expand all
88 case SERVICE_WORKER_ERROR_START_WORKER_FAILED: 90 case SERVICE_WORKER_ERROR_START_WORKER_FAILED:
89 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND: 91 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND:
90 case SERVICE_WORKER_ERROR_EXISTS: 92 case SERVICE_WORKER_ERROR_EXISTS:
91 case SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED: 93 case SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED:
92 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED: 94 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED:
93 case SERVICE_WORKER_ERROR_IPC_FAILED: 95 case SERVICE_WORKER_ERROR_IPC_FAILED:
94 case SERVICE_WORKER_ERROR_NETWORK: 96 case SERVICE_WORKER_ERROR_NETWORK:
95 case SERVICE_WORKER_ERROR_SECURITY: 97 case SERVICE_WORKER_ERROR_SECURITY:
96 case SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED: 98 case SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED:
97 case SERVICE_WORKER_ERROR_STATE: 99 case SERVICE_WORKER_ERROR_STATE:
100 case SERVICE_WORKER_ERROR_TIMEOUT:
101 case SERVICE_WORKER_ERROR_MAX_VALUE:
98 status = PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR; 102 status = PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR;
99 break; 103 break;
100 case SERVICE_WORKER_OK: 104 case SERVICE_WORKER_OK:
101 NOTREACHED(); 105 NOTREACHED();
102 break; 106 break;
103 } 107 }
104 108
105 BrowserThread::PostTask(BrowserThread::UI, 109 BrowserThread::PostTask(BrowserThread::UI,
106 FROM_HERE, 110 FROM_HERE,
107 base::Bind(dispatch_complete_callback, status)); 111 base::Bind(dispatch_complete_callback, status));
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 base::Bind(&FindServiceWorkerRegistration, 168 base::Bind(&FindServiceWorkerRegistration,
165 origin, 169 origin,
166 service_worker_registration_id, 170 service_worker_registration_id,
167 notification_id, 171 notification_id,
168 notification_data, 172 notification_data,
169 dispatch_complete_callback, 173 dispatch_complete_callback,
170 service_worker_context)); 174 service_worker_context));
171 } 175 }
172 176
173 } // namespace content 177 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/push_messaging/push_messaging_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698