Chromium Code Reviews| 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(); |
| } |