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

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: 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..1a33ed995ab496b1094eef1ef3f7d64a337a033b 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,7 @@ void RemoteCommandsInvalidator::Initialize(
invalidation::InvalidationService* invalidation_service) {
DCHECK_EQ(SHUT_DOWN, state_);
DCHECK(thread_checker_.CalledOnValidThread());
+ CHROMEOS_SYSLOG(WARNING) << "Initialize RemoteCommandsInvalidator.";
Andrew T Wilson (Slow) 2016/06/29 15:35:35 I think these are all intended to be temporary log
Marton Hunyady 2016/06/30 08:45:54 Done.
DCHECK(invalidation_service);
invalidation_service_ = invalidation_service;
@@ -38,6 +40,7 @@ void RemoteCommandsInvalidator::Initialize(
void RemoteCommandsInvalidator::Shutdown() {
DCHECK_NE(SHUT_DOWN, state_);
DCHECK(thread_checker_.CalledOnValidThread());
+ CHROMEOS_SYSLOG(WARNING) << "Shutdown RemoteCommandsInvalidator.";
Stop();
@@ -48,6 +51,8 @@ void RemoteCommandsInvalidator::Shutdown() {
void RemoteCommandsInvalidator::Start() {
DCHECK_EQ(STOPPED, state_);
DCHECK(thread_checker_.CalledOnValidThread());
+ CHROMEOS_SYSLOG(WARNING) << "Starting RemoteCommandsInvalidator.";
+
state_ = STARTED;
OnStart();
@@ -56,6 +61,7 @@ void RemoteCommandsInvalidator::Start() {
void RemoteCommandsInvalidator::Stop() {
DCHECK_NE(SHUT_DOWN, state_);
DCHECK(thread_checker_.CalledOnValidThread());
+ CHROMEOS_SYSLOG(WARNING) << "Stopping RemoteCommandsInvalidator.";
if (state_ == STARTED) {
Unregister();
@@ -69,6 +75,8 @@ void RemoteCommandsInvalidator::OnInvalidatorStateChange(
syncer::InvalidatorState state) {
DCHECK_EQ(STARTED, state_);
DCHECK(thread_checker_.CalledOnValidThread());
+ CHROMEOS_SYSLOG(WARNING) << "RemoteCommandsInvalidator state changed: "
+ << state;
invalidation_service_enabled_ = state == syncer::INVALIDATIONS_ENABLED;
UpdateInvalidationsEnabled();
@@ -78,6 +86,8 @@ void RemoteCommandsInvalidator::OnIncomingInvalidation(
const syncer::ObjectIdInvalidationMap& invalidation_map) {
DCHECK_EQ(STARTED, state_);
DCHECK(thread_checker_.CalledOnValidThread());
+ CHROMEOS_SYSLOG(WARNING)
+ << "RemoteCommandsInvalidator received invalidation.";
if (!invalidation_service_enabled_)
LOG(WARNING) << "Unexpected invalidation received.";
@@ -103,6 +113,7 @@ std::string RemoteCommandsInvalidator::GetOwnerName() const {
void RemoteCommandsInvalidator::ReloadPolicyData(
const enterprise_management::PolicyData* policy) {
DCHECK(thread_checker_.CalledOnValidThread());
+ CHROMEOS_SYSLOG(WARNING) << "RemoteCommandsInvalidator ReloadPolicyData.";
if (state_ != STARTED)
return;
@@ -125,6 +136,8 @@ void RemoteCommandsInvalidator::ReloadPolicyData(
void RemoteCommandsInvalidator::Register(
const invalidation::ObjectId& object_id) {
+ CHROMEOS_SYSLOG(WARNING) << "Register RemoteCommandsInvalidator.";
+
// Register this handler with the invalidation service if needed.
if (!is_registered_) {
OnInvalidatorStateChange(invalidation_service_->GetInvalidatorState());
@@ -142,6 +155,7 @@ void RemoteCommandsInvalidator::Register(
}
void RemoteCommandsInvalidator::Unregister() {
+ 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