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

Unified Diff: chrome/browser/policy/cloud/remote_commands_invalidator.cc

Issue 2108873004: Add logging of remote command invalidations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace b with crbug Created 4 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
« no previous file with comments | « no previous file | components/policy/core/common/remote_commands/remote_commands_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()));
« no previous file with comments | « no previous file | components/policy/core/common/remote_commands/remote_commands_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698