| Index: chrome/browser/policy/cloud/remote_commands_invalidator.cc
|
| diff --git a/chrome/browser/policy/cloud/remote_commands_invalidator.cc b/chrome/browser/policy/cloud/remote_commands_invalidator.cc
|
| index eb0e412d4043d0ada6d2dadcf719df8b41e2f919..ce9d5cfd2b2a0891556ca7e48209057855246c01 100644
|
| --- a/chrome/browser/policy/cloud/remote_commands_invalidator.cc
|
| +++ b/chrome/browser/policy/cloud/remote_commands_invalidator.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include <string>
|
|
|
| +#include "base/chromeos/logging.h"
|
| #include "base/logging.h"
|
| #include "components/invalidation/public/invalidation.h"
|
| #include "components/invalidation/public/invalidation_service.h"
|
| @@ -27,6 +28,8 @@ void RemoteCommandsInvalidator::Initialize(
|
| invalidation::InvalidationService* invalidation_service) {
|
| DCHECK_EQ(SHUT_DOWN, state_);
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| + // TODO(hunyadym): Remove after crbug.com/582506 is fixed.
|
| + CHROMEOS_SYSLOG(WARNING) << "Initialize RemoteCommandsInvalidator.";
|
|
|
| DCHECK(invalidation_service);
|
| invalidation_service_ = invalidation_service;
|
| @@ -38,6 +41,8 @@ void RemoteCommandsInvalidator::Initialize(
|
| void RemoteCommandsInvalidator::Shutdown() {
|
| DCHECK_NE(SHUT_DOWN, state_);
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| + // TODO(hunyadym): Remove after crbug.com/582506 is fixed.
|
| + CHROMEOS_SYSLOG(WARNING) << "Shutdown RemoteCommandsInvalidator.";
|
|
|
| Stop();
|
|
|
| @@ -48,6 +53,9 @@ void RemoteCommandsInvalidator::Shutdown() {
|
| void RemoteCommandsInvalidator::Start() {
|
| DCHECK_EQ(STOPPED, state_);
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| + // TODO(hunyadym): Remove after crbug.com/582506 is fixed.
|
| + CHROMEOS_SYSLOG(WARNING) << "Starting RemoteCommandsInvalidator.";
|
| +
|
| state_ = STARTED;
|
|
|
| OnStart();
|
| @@ -56,6 +64,8 @@ void RemoteCommandsInvalidator::Start() {
|
| void RemoteCommandsInvalidator::Stop() {
|
| DCHECK_NE(SHUT_DOWN, state_);
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| + // TODO(hunyadym): Remove after crbug.com/582506 is fixed.
|
| + CHROMEOS_SYSLOG(WARNING) << "Stopping RemoteCommandsInvalidator.";
|
|
|
| if (state_ == STARTED) {
|
| Unregister();
|
| @@ -69,6 +79,9 @@ void RemoteCommandsInvalidator::OnInvalidatorStateChange(
|
| syncer::InvalidatorState state) {
|
| DCHECK_EQ(STARTED, state_);
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| + // TODO(hunyadym): Remove after crbug.com/582506 is fixed.
|
| + CHROMEOS_SYSLOG(WARNING) << "RemoteCommandsInvalidator state changed: "
|
| + << state;
|
|
|
| invalidation_service_enabled_ = state == syncer::INVALIDATIONS_ENABLED;
|
| UpdateInvalidationsEnabled();
|
| @@ -78,6 +91,9 @@ void RemoteCommandsInvalidator::OnIncomingInvalidation(
|
| const syncer::ObjectIdInvalidationMap& invalidation_map) {
|
| DCHECK_EQ(STARTED, state_);
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| + // TODO(hunyadym): Remove after crbug.com/582506 is fixed.
|
| + CHROMEOS_SYSLOG(WARNING)
|
| + << "RemoteCommandsInvalidator received invalidation.";
|
|
|
| if (!invalidation_service_enabled_)
|
| LOG(WARNING) << "Unexpected invalidation received.";
|
| @@ -92,6 +108,8 @@ void RemoteCommandsInvalidator::OnIncomingInvalidation(
|
| // Acknowledge all invalidations.
|
| for (const auto& it : list)
|
| it.Acknowledge();
|
| + // TODO(hunyadym): Remove after crbug.com/582506 is fixed.
|
| + CHROMEOS_SYSLOG(WARNING) << "Invalidations acknowledged.";
|
|
|
| DoRemoteCommandsFetch();
|
| }
|
| @@ -103,6 +121,8 @@ std::string RemoteCommandsInvalidator::GetOwnerName() const {
|
| void RemoteCommandsInvalidator::ReloadPolicyData(
|
| const enterprise_management::PolicyData* policy) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| + // TODO(hunyadym): Remove after crbug.com/582506 is fixed.
|
| + CHROMEOS_SYSLOG(WARNING) << "RemoteCommandsInvalidator ReloadPolicyData.";
|
|
|
| if (state_ != STARTED)
|
| return;
|
| @@ -125,6 +145,9 @@ void RemoteCommandsInvalidator::ReloadPolicyData(
|
|
|
| void RemoteCommandsInvalidator::Register(
|
| const invalidation::ObjectId& object_id) {
|
| + // TODO(hunyadym): Remove after crbug.com/582506 is fixed.
|
| + CHROMEOS_SYSLOG(WARNING) << "Register RemoteCommandsInvalidator.";
|
| +
|
| // Register this handler with the invalidation service if needed.
|
| if (!is_registered_) {
|
| OnInvalidatorStateChange(invalidation_service_->GetInvalidatorState());
|
| @@ -142,6 +165,8 @@ void RemoteCommandsInvalidator::Register(
|
| }
|
|
|
| void RemoteCommandsInvalidator::Unregister() {
|
| + // TODO(hunyadym): Remove after crbug.com/582506 is fixed.
|
| + CHROMEOS_SYSLOG(WARNING) << "Unregister RemoteCommandsInvalidator.";
|
| if (is_registered_) {
|
| CHECK(invalidation_service_->UpdateRegisteredInvalidationIds(
|
| this, syncer::ObjectIdSet()));
|
|
|