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

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

Issue 19733003: Implement cloud policy invalidations using the invalidation service framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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/policy/cloud/cloud_policy_store.cc
diff --git a/chrome/browser/policy/cloud/cloud_policy_store.cc b/chrome/browser/policy/cloud/cloud_policy_store.cc
index 2205fb4922b1a58740848ce5c567eb1862af2b13..e15219ae51979d31335e21e5f309e2da3b5a7c23 100644
--- a/chrome/browser/policy/cloud/cloud_policy_store.cc
+++ b/chrome/browser/policy/cloud/cloud_policy_store.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/logging.h"
#include "chrome/browser/policy/cloud/cloud_policy_store.h"
namespace policy {
@@ -11,7 +12,10 @@ CloudPolicyStore::Observer::~Observer() {}
CloudPolicyStore::CloudPolicyStore()
: status_(STATUS_OK),
validation_status_(CloudPolicyValidatorBase::VALIDATION_OK),
- is_initialized_(false) {}
+ is_initialized_(false),
+ hash_value_(0),
+ policy_changed_(false),
+ invalidation_version_(0) {}
CloudPolicyStore::~CloudPolicyStore() {}
@@ -33,4 +37,9 @@ void CloudPolicyStore::NotifyStoreError() {
FOR_EACH_OBSERVER(Observer, observers_, OnStoreError(this));
}
-} // namespace
+void CloudPolicyStore::SetPolicyHashValue(uint32 hash_value) {
+ policy_changed_ = hash_value != hash_value_;
+ hash_value_ = hash_value;
+}
+
+} // namespace policy

Powered by Google App Engine
This is Rietveld 408576698