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

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

Issue 10092010: Add CloudPolicyService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 8 years, 7 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 | « chrome/browser/policy/cloud_policy_store.h ('k') | chrome/browser/policy/mock_cloud_policy_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/cloud_policy_store.cc
diff --git a/chrome/browser/policy/cloud_policy_store.cc b/chrome/browser/policy/cloud_policy_store.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b4eb8192c208390767ade3c083fb503d7b823fa8
--- /dev/null
+++ b/chrome/browser/policy/cloud_policy_store.cc
@@ -0,0 +1,35 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/policy/cloud_policy_store.h"
+
+namespace policy {
+
+CloudPolicyStore::Observer::~Observer() {}
+
+CloudPolicyStore::CloudPolicyStore()
+ : status_(STATUS_OK),
+ is_initialized_(false) {}
+
+CloudPolicyStore::~CloudPolicyStore() {}
+
+void CloudPolicyStore::AddObserver(CloudPolicyStore::Observer* observer) {
+ observers_.AddObserver(observer);
+}
+
+void CloudPolicyStore::RemoveObserver(CloudPolicyStore::Observer* observer) {
+ observers_.RemoveObserver(observer);
+}
+
+void CloudPolicyStore::NotifyStoreLoaded() {
+ is_initialized_ = true;
+ FOR_EACH_OBSERVER(Observer, observers_, OnStoreLoaded(this));
+}
+
+void CloudPolicyStore::NotifyStoreError() {
+ is_initialized_ = true;
+ FOR_EACH_OBSERVER(Observer, observers_, OnStoreError(this));
+}
+
+} // namespace
« no previous file with comments | « chrome/browser/policy/cloud_policy_store.h ('k') | chrome/browser/policy/mock_cloud_policy_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698