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 |