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

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

Issue 1063823005: Service Worker: Use more specific errors when StartWorker fails (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update histograms.xml Created 5 years, 8 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 30 matching lines...) Expand all
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: 50 case SERVICE_WORKER_ERROR_TIMEOUT:
51 case SERVICE_WORKER_ERROR_SCRIPT_EVALUATE_FAILED:
51 case SERVICE_WORKER_ERROR_MAX_VALUE: 52 case SERVICE_WORKER_ERROR_MAX_VALUE:
52 status = PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR; 53 status = PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR;
53 break; 54 break;
54 } 55 }
55 56
56 BrowserThread::PostTask(BrowserThread::UI, 57 BrowserThread::PostTask(BrowserThread::UI,
57 FROM_HERE, 58 FROM_HERE,
58 base::Bind(dispatch_complete_callback, status)); 59 base::Bind(dispatch_complete_callback, status));
59 } 60 }
60 61
(...skipping 30 matching lines...) Expand all
91 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND: 92 case SERVICE_WORKER_ERROR_PROCESS_NOT_FOUND:
92 case SERVICE_WORKER_ERROR_EXISTS: 93 case SERVICE_WORKER_ERROR_EXISTS:
93 case SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED: 94 case SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED:
94 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED: 95 case SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED:
95 case SERVICE_WORKER_ERROR_IPC_FAILED: 96 case SERVICE_WORKER_ERROR_IPC_FAILED:
96 case SERVICE_WORKER_ERROR_NETWORK: 97 case SERVICE_WORKER_ERROR_NETWORK:
97 case SERVICE_WORKER_ERROR_SECURITY: 98 case SERVICE_WORKER_ERROR_SECURITY:
98 case SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED: 99 case SERVICE_WORKER_ERROR_EVENT_WAITUNTIL_REJECTED:
99 case SERVICE_WORKER_ERROR_STATE: 100 case SERVICE_WORKER_ERROR_STATE:
100 case SERVICE_WORKER_ERROR_TIMEOUT: 101 case SERVICE_WORKER_ERROR_TIMEOUT:
102 case SERVICE_WORKER_ERROR_SCRIPT_EVALUATE_FAILED:
101 case SERVICE_WORKER_ERROR_MAX_VALUE: 103 case SERVICE_WORKER_ERROR_MAX_VALUE:
102 status = PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR; 104 status = PERSISTENT_NOTIFICATION_STATUS_SERVICE_WORKER_ERROR;
103 break; 105 break;
104 case SERVICE_WORKER_OK: 106 case SERVICE_WORKER_OK:
105 NOTREACHED(); 107 NOTREACHED();
106 break; 108 break;
107 } 109 }
108 110
109 BrowserThread::PostTask(BrowserThread::UI, 111 BrowserThread::PostTask(BrowserThread::UI,
110 FROM_HERE, 112 FROM_HERE,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 base::Bind(&FindServiceWorkerRegistration, 170 base::Bind(&FindServiceWorkerRegistration,
169 origin, 171 origin,
170 service_worker_registration_id, 172 service_worker_registration_id,
171 notification_id, 173 notification_id,
172 notification_data, 174 notification_data,
173 dispatch_complete_callback, 175 dispatch_complete_callback,
174 service_worker_context)); 176 service_worker_context));
175 } 177 }
176 178
177 } // namespace content 179 } // 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