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

Unified Diff: content/common/service_worker_messages.h

Issue 26442004: Service worker registration error support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review nits Created 7 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
Index: content/common/service_worker_messages.h
diff --git a/content/common/service_worker_messages.h b/content/common/service_worker_messages.h
index a0e576124f19940eb8f8b947c3d01aadc95cd23b..d15a1d454522acb32bb97c277af69a91035d24be 100644
--- a/content/common/service_worker_messages.h
+++ b/content/common/service_worker_messages.h
@@ -7,10 +7,16 @@
#include "base/strings/string16.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_param_traits.h"
+#include "third_party/WebKit/public/platform/WebServiceWorkerError.h"
#include "url/gurl.h"
+#undef IPC_MESSAGE_EXPORT
+#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
+
#define IPC_MESSAGE_START ServiceWorkerMsgStart
+IPC_ENUM_TRAITS(WebKit::WebServiceWorkerError::ErrorType)
+
// Messages sent from the child process to the browser.
IPC_MESSAGE_CONTROL4(ServiceWorkerHostMsg_RegisterServiceWorker,
@@ -36,3 +42,14 @@ IPC_MESSAGE_CONTROL3(ServiceWorkerMsg_ServiceWorkerRegistered,
IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_ServiceWorkerUnregistered,
int32 /* thread_id */,
int32 /* request_id */)
+
+// Sent when any kind of registration error occurs during a
+// RegisterServiceWorker / UnregisterServiceWorker handler above. In
+// the future this can expand to include the actual reason for the
+// error, or even be split if there is a significant difference
+// between registration and unregistration errors.
michaeln 2013/10/25 21:41:25 The first sentence looks good enough.
alecflett 2013/10/25 23:41:56 Done.
+IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError,
+ int32 /* thread_id */,
+ int32 /* request_id */,
+ WebKit::WebServiceWorkerError::ErrorType /* code */,
+ string16 /* message */)
michaeln 2013/10/25 21:41:25 should we use utf8 here and upsample at the WebKit
alecflett 2013/10/25 23:41:56 It's fairly common to just use the enum and IPC_EN
michaeln 2013/10/26 00:41:01 I was asking about the string value type? We coul
alecflett 2013/10/28 17:03:14 Oh I see. I personally prefer doing the conversion

Powered by Google App Engine
This is Rietveld 408576698