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

Unified Diff: content/browser/devtools/protocol/service_worker_handler.cc

Issue 1636483002: Update the PushEvent to have a nullable PushMessageData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 11 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/browser/devtools/protocol/service_worker_handler.cc
diff --git a/content/browser/devtools/protocol/service_worker_handler.cc b/content/browser/devtools/protocol/service_worker_handler.cc
index a84091c276b18fa038c9aa397498bdc47cd78caa..e7c1cd0ed8506e2ada350a20b1fbf24bcf7a8f87 100644
--- a/content/browser/devtools/protocol/service_worker_handler.cc
+++ b/content/browser/devtools/protocol/service_worker_handler.cc
@@ -23,6 +23,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/push_event_payload.h"
#include "content/public/common/push_messaging_status.h"
#include "url/gurl.h"
@@ -440,9 +441,11 @@ Response ServiceWorkerHandler::DeliverPushMessage(
int64_t id = 0;
if (!base::StringToInt64(registration_id, &id))
return CreateInvalidVersionIdErrorResponse();
+ PushEventPayload payload;
+ payload.setData(data);
Peter Beverloo 2016/01/26 12:35:18 Perhaps only setData() if |data.size() > 0|? (The
harkness 2016/01/26 14:49:20 Done.
BrowserContext::DeliverPushMessage(
render_frame_host_->GetProcess()->GetBrowserContext(), GURL(origin), id,
- data, base::Bind(&PushDeliveryNoOp));
+ payload, base::Bind(&PushDeliveryNoOp));
return Response::OK();
}

Powered by Google App Engine
This is Rietveld 408576698