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

Unified Diff: content/renderer/service_worker/service_worker_context_client.cc

Issue 2392343002: Plumbing in notification replies: PlatformNotificationService -> SW (Closed)
Patch Set: Send NullableString through IPC, remove settings check from ButtonClickWithReply, add TODO in messa… Created 4 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/renderer/service_worker/service_worker_context_client.cc
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc
index b321f8988fd1f08a3ace0cdb04338809cc4a4a7e..04cc311fdcd4860ca445824b9bd45e9bfff85850 100644
--- a/content/renderer/service_worker/service_worker_context_client.cc
+++ b/content/renderer/service_worker/service_worker_context_client.cc
@@ -10,6 +10,7 @@
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
+#include "base/strings/string16.h"
Peter Beverloo 2016/10/12 13:58:31 delete?
awdf 2016/10/12 17:04:01 Done.
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_checker.h"
#include "base/threading/thread_local.h"
@@ -867,8 +868,7 @@ void ServiceWorkerContextClient::DispatchFetchEvent(
webRequest.setURL(blink::WebURL(request.url));
webRequest.setMethod(blink::WebString::fromUTF8(request.method));
for (ServiceWorkerHeaderMap::const_iterator it = request.headers.begin();
- it != request.headers.end();
- ++it) {
+ it != request.headers.end(); ++it) {
webRequest.setHeader(blink::WebString::fromUTF8(it->first),
blink::WebString::fromUTF8(it->second));
}
@@ -900,12 +900,14 @@ void ServiceWorkerContextClient::OnNotificationClickEvent(
int request_id,
const std::string& notification_id,
const PlatformNotificationData& notification_data,
- int action_index) {
+ int action_index,
+ const base::NullableString16& reply) {
TRACE_EVENT0("ServiceWorker",
"ServiceWorkerContextClient::OnNotificationClickEvent");
proxy_->dispatchNotificationClickEvent(
request_id, blink::WebString::fromUTF8(notification_id),
- ToWebNotificationData(notification_data), action_index);
+ ToWebNotificationData(notification_data), action_index,
+ blink::WebString(reply));
}
void ServiceWorkerContextClient::OnNotificationCloseEvent(

Powered by Google App Engine
This is Rietveld 408576698