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

Unified Diff: chrome/browser/chromeos/policy/heartbeat_scheduler.cc

Issue 1276853003: Revert of Send GCM id to DMServer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/chromeos/policy/heartbeat_scheduler.cc
diff --git a/chrome/browser/chromeos/policy/heartbeat_scheduler.cc b/chrome/browser/chromeos/policy/heartbeat_scheduler.cc
index a9109649dd59ef2996603b2b0f252dc59fa7615e..4e4e4eff22166e6330b726a8238ad42e9256427c 100644
--- a/chrome/browser/chromeos/policy/heartbeat_scheduler.cc
+++ b/chrome/browser/chromeos/policy/heartbeat_scheduler.cc
@@ -6,8 +6,6 @@
#include <string>
-#include "base/bind.h"
-#include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/location.h"
#include "base/sequenced_task_runner.h"
@@ -162,7 +160,6 @@
HeartbeatScheduler::HeartbeatScheduler(
gcm::GCMDriver* driver,
- policy::CloudPolicyClient* cloud_policy_client,
const std::string& enrollment_domain,
const std::string& device_id,
const scoped_refptr<base::SequencedTaskRunner>& task_runner)
@@ -170,9 +167,8 @@
enrollment_domain_(enrollment_domain),
device_id_(device_id),
heartbeat_enabled_(false),
- heartbeat_interval_(
- base::TimeDelta::FromMilliseconds(kDefaultHeartbeatIntervalMs)),
- cloud_policy_client_(cloud_policy_client),
+ heartbeat_interval_(base::TimeDelta::FromMilliseconds(
+ kDefaultHeartbeatIntervalMs)),
gcm_driver_(driver),
weak_factory_(this) {
// If no GCMDriver (e.g. this is loaded as part of an unrelated unit test)
@@ -300,15 +296,6 @@
DCHECK(!registration_id.empty());
registration_helper_.reset();
registration_id_ = registration_id;
-
- if (cloud_policy_client_) {
- // TODO(binjin): Avoid sending the same GCM id to the server.
- // See http://crbug.com/516375
- cloud_policy_client_->UpdateGcmId(
- registration_id,
- base::Bind(&HeartbeatScheduler::OnGcmIdUpdateRequestSent,
- weak_factory_.GetWeakPtr()));
- }
// Now that GCM registration is complete, start sending heartbeats.
ScheduleNextHeartbeat();
@@ -385,9 +372,4 @@
DVLOG(1) << "Heartbeat sent with message_id: " << message_id;
}
-void HeartbeatScheduler::OnGcmIdUpdateRequestSent(bool success) {
- // TODO(binjin): Handle the failure, probably by exponential backoff.
- LOG_IF(WARNING, !success) << "Failed to send GCM id to DM server";
-}
-
} // namespace policy
« no previous file with comments | « chrome/browser/chromeos/policy/heartbeat_scheduler.h ('k') | chrome/browser/chromeos/policy/heartbeat_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698