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

Unified Diff: content/renderer/push_messaging/push_messaging_dispatcher.cc

Issue 1154303003: Move push endpoint concatenation up to the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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
« no previous file with comments | « content/renderer/push_messaging/push_messaging_dispatcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 63b425b8c3bba040eac8f5a8f1a2a0aace2c1c92..7d11e6fcce2bed8ba73726538270d60b9f623afc 100644
--- a/content/renderer/push_messaging/push_messaging_dispatcher.cc
+++ b/content/renderer/push_messaging/push_messaging_dispatcher.cc
@@ -19,8 +19,6 @@
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "url/gurl.h"
-using blink::WebString;
-
namespace content {
PushMessagingDispatcher::PushMessagingDispatcher(RenderFrame* render_frame)
@@ -86,8 +84,7 @@ void PushMessagingDispatcher::DoSubscribe(
void PushMessagingDispatcher::OnSubscribeFromDocumentSuccess(
int32_t request_id,
- const GURL& endpoint,
- const std::string& subscription_id) {
+ const GURL& endpoint) {
blink::WebPushSubscriptionCallbacks* callbacks =
subscription_callbacks_.Lookup(request_id);
@@ -95,9 +92,7 @@ void PushMessagingDispatcher::OnSubscribeFromDocumentSuccess(
CHECK(callbacks) << "Invalid request id received: " << request_id;
scoped_ptr<blink::WebPushSubscription> subscription(
- new blink::WebPushSubscription(
- WebString::fromUTF8(endpoint.spec()),
- WebString::fromUTF8(subscription_id)));
+ new blink::WebPushSubscription(endpoint));
callbacks->onSuccess(subscription.release());
subscription_callbacks_.Remove(request_id);
@@ -114,7 +109,7 @@ void PushMessagingDispatcher::OnSubscribeFromDocumentError(
scoped_ptr<blink::WebPushError> error(new blink::WebPushError(
blink::WebPushError::ErrorTypeAbort,
- WebString::fromUTF8(PushRegistrationStatusToString(status))));
+ blink::WebString::fromUTF8(PushRegistrationStatusToString(status))));
callbacks->onError(error.release());
subscription_callbacks_.Remove(request_id);
« no previous file with comments | « content/renderer/push_messaging/push_messaging_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698