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

Unified Diff: content/child/push_messaging/push_provider.cc

Issue 1816123002: Add testing for subscription from service workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix asan errors Created 4 years, 9 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/child/push_messaging/push_provider.cc
diff --git a/content/child/push_messaging/push_provider.cc b/content/child/push_messaging/push_provider.cc
index 254d855106bd9466a87c7009f3dff7f01609c275..a9e79f5cb7db4b8391c6f1623c559ae0476210c6 100644
--- a/content/child/push_messaging/push_provider.cc
+++ b/content/child/push_messaging/push_provider.cc
@@ -77,7 +77,10 @@ void PushProvider::subscribe(
GetServiceWorkerRegistrationId(service_worker_registration);
PushSubscriptionOptions content_options;
content_options.user_visible_only = options.userVisibleOnly;
- content_options.sender_info = options.applicationServerKey.utf8();
+
+ // Just treat the server key as a string of bytes and pass it to the push
+ // service.
+ content_options.sender_info = options.applicationServerKey.latin1();
thread_safe_sender_->Send(new PushMessagingHostMsg_SubscribeFromWorker(
request_id, service_worker_registration_id, content_options));
}

Powered by Google App Engine
This is Rietveld 408576698