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

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

Issue 327423006: Revert r276792 - "Hook PushMessagingMessageFilter up to GCMDriver" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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: 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
deleted file mode 100644
index ad78da137fbd693567b627578c2c1193b74af284..0000000000000000000000000000000000000000
--- a/chrome/browser/services/gcm/push_messaging_service_impl.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/services/gcm/push_messaging_service_impl.h"
-
-#include <vector>
-
-#include "base/bind.h"
-#include "chrome/browser/services/gcm/gcm_profile_service.h"
-#include "components/gcm_driver/gcm_driver.h"
-
-namespace gcm {
-
-PushMessagingServiceImpl::PushMessagingServiceImpl(
- GCMProfileService* gcm_profile_service)
- : gcm_profile_service_(gcm_profile_service),
- weak_factory_(this) {}
-
-PushMessagingServiceImpl::~PushMessagingServiceImpl() {}
-
-void PushMessagingServiceImpl::Register(
- const std::string& app_id,
- const std::string& sender_id,
- const content::PushMessagingService::RegisterCallback& callback) {
- // The GCMDriver could be NULL if GCMProfileService has been shut down.
- if (!gcm_profile_service_->driver())
- return;
- std::vector<std::string> sender_ids(1, sender_id);
- gcm_profile_service_->driver()->Register(
- app_id,
- sender_ids,
- base::Bind(&PushMessagingServiceImpl::DidRegister,
- weak_factory_.GetWeakPtr(),
- callback));
-}
-
-void PushMessagingServiceImpl::DidRegister(
- const content::PushMessagingService::RegisterCallback& callback,
- const std::string& registration_id,
- GCMClient::Result result) {
- GURL endpoint = GURL("https://android.googleapis.com/gcm/send");
- bool error = (result != GCMClient::SUCCESS);
- callback.Run(endpoint, registration_id, error);
-}
-
-} // namespace gcm
« no previous file with comments | « chrome/browser/services/gcm/push_messaging_service_impl.h ('k') | chrome/browser/ui/app_list/test/fake_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698