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

Unified Diff: chrome/browser/services/gcm/push_messaging_service_impl.cc

Issue 823993003: Push API: Remove AddAppHandlerIfNecessary to prevent DCHECK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/services/gcm/push_messaging_service_impl.cc
diff --git a/chrome/browser/services/gcm/push_messaging_service_impl.cc b/chrome/browser/services/gcm/push_messaging_service_impl.cc
index 31cbe3908a64e1d42732fc419b5b63bc6a38eaaa..f6f65061283b439341220c1108d0dce8a29fbaf0 100644
--- a/chrome/browser/services/gcm/push_messaging_service_impl.cc
+++ b/chrome/browser/services/gcm/push_messaging_service_impl.cc
@@ -247,13 +247,6 @@ void PushMessagingServiceImpl::RegisterFromDocument(
return;
}
- // TODO(johnme): This is probably redundant due to
- // https://codereview.chromium.org/756063002, or even if it isn't it'll
- // interfere with auto-removing the app handler, so should be removed.
- // If this is registering for the first time then the driver does not have
- // this as an app handler and registration would fail.
- AddAppHandlerIfNecessary();
-
content::RenderFrameHost* render_frame_host =
content::RenderFrameHost::FromID(renderer_id, render_frame_id);
if (!render_frame_host)
@@ -315,10 +308,6 @@ void PushMessagingServiceImpl::RegisterFromWorker(
return;
}
- // If this is registering for the first time then the driver does not have
- // this as an app handler and registration would fail.
- AddAppHandlerIfNecessary();
-
GURL embedding_origin = requesting_origin;
blink::WebPushPermissionStatus permission_status =
PushMessagingServiceImpl::GetPermissionStatus(requesting_origin,
@@ -456,11 +445,4 @@ bool PushMessagingServiceImpl::HasPermission(const GURL& origin) {
CONTENT_SETTING_ALLOW;
}
-void PushMessagingServiceImpl::AddAppHandlerIfNecessary() {
- if (gcm_profile_service_->driver()->GetAppHandler(
- kPushMessagingApplicationIdPrefix) != this)
- gcm_profile_service_->driver()->AddAppHandler(
- kPushMessagingApplicationIdPrefix, this);
-}
-
} // namespace gcm
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698