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

Unified Diff: content/browser/push_messaging_message_filter.cc

Issue 404353003: Define PushMessagingApplicationId and replace ad-hoc code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/browser/push_messaging_message_filter.cc
diff --git a/content/browser/push_messaging_message_filter.cc b/content/browser/push_messaging_message_filter.cc
index f34ffb2ad1fee39745d817a691f06ec54846c72f..fc6b73bee0dcb1ae1c4669e456bb2860b4d53a21 100644
--- a/content/browser/push_messaging_message_filter.cc
+++ b/content/browser/push_messaging_message_filter.cc
@@ -13,6 +13,7 @@
#include "content/common/push_messaging_messages.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/push_messaging_application_id.h"
#include "content/public/browser/push_messaging_service.h"
namespace content {
@@ -84,10 +85,10 @@ void PushMessagingMessageFilter::DoRegister(
PUSH_MESSAGING_STATUS_REGISTRATION_FAILED_SERVICE_NOT_AVAILABLE));
return;
}
- // TODO(mvanouwerkerk): Is this the app_id format we want to use?
- std::string app_id =
- origin.spec() + " " + base::Int64ToString(service_worker_registration_id);
- service()->Register(app_id,
+ PushMessagingApplicationId application_id =
+ PushMessagingApplicationId(origin, service_worker_registration_id);
+ DCHECK(application_id.is_valid());
+ service()->Register(application_id.ToString(),
sender_id,
render_process_id_,
render_frame_id,

Powered by Google App Engine
This is Rietveld 408576698