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

Unified Diff: content/renderer/push_messaging/push_messaging_dispatcher.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/renderer/push_messaging/push_messaging_dispatcher.cc
diff --git a/content/renderer/push_messaging/push_messaging_dispatcher.cc b/content/renderer/push_messaging/push_messaging_dispatcher.cc
index f505f93ed80e2858c01d844283293b7e76b93b5b..0bd40dc69bb480abe3dd8bf88c1098ff395800a7 100644
--- a/content/renderer/push_messaging/push_messaging_dispatcher.cc
+++ b/content/renderer/push_messaging/push_messaging_dispatcher.cc
@@ -55,7 +55,9 @@ void PushMessagingDispatcher::subscribe(
} else {
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();
DoSubscribe(service_worker_registration, content_options, callbacks);
}
}
« no previous file with comments | « content/child/push_messaging/push_provider.cc ('k') | third_party/WebKit/Source/modules/push_messaging/PushManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698