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

Unified Diff: chrome/browser/policy/dummy_cloud_policy_provider.h

Issue 7147015: Move user cloud policy to BrowserProcess (was 6979011) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit_test include breakage Created 9 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 | « chrome/browser/policy/device_policy_cache.cc ('k') | chrome/browser/policy/dummy_cloud_policy_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/dummy_cloud_policy_provider.h
diff --git a/chrome/browser/policy/dummy_cloud_policy_provider.h b/chrome/browser/policy/dummy_cloud_policy_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..269b5f27b3d6c94d066dcb691e749e99e2bc801f
--- /dev/null
+++ b/chrome/browser/policy/dummy_cloud_policy_provider.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2011 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.
+
+#ifndef CHROME_BROWSER_POLICY_DUMMY_CLOUD_POLICY_PROVIDER_H_
+#define CHROME_BROWSER_POLICY_DUMMY_CLOUD_POLICY_PROVIDER_H_
+#pragma once
+
+#include "chrome/browser/policy/cloud_policy_provider.h"
+
+namespace policy {
+
+// A cloud policy provider for tests, that provides 0 policies, but always
+// reports that it is initialized.
+class DummyCloudPolicyProvider : public CloudPolicyProvider {
+ public:
+ explicit DummyCloudPolicyProvider(const PolicyDefinitionList* policy_list);
+ virtual ~DummyCloudPolicyProvider();
+
+ // CloudPolicyProvider overrides:
+ virtual void AppendCache(CloudPolicyCacheBase* cache) OVERRIDE;
+ virtual void PrependCache(CloudPolicyCacheBase* cache) OVERRIDE;
+
+ virtual bool Provide(ConfigurationPolicyStoreInterface* store);
+
+ private:
+ // ConfigurationPolicyProvider overrides:
+ virtual void AddObserver(
+ ConfigurationPolicyProvider::Observer* observer) OVERRIDE;
+ virtual void RemoveObserver(
+ ConfigurationPolicyProvider::Observer* observer) OVERRIDE;
+
+ ObserverList<ConfigurationPolicyProvider::Observer, true> observer_list_;
+
+ DISALLOW_COPY_AND_ASSIGN(DummyCloudPolicyProvider);
+};
+
+} // namespace policy
+
+#endif // CHROME_BROWSER_POLICY_DUMMY_CLOUD_POLICY_PROVIDER_H_
« no previous file with comments | « chrome/browser/policy/device_policy_cache.cc ('k') | chrome/browser/policy/dummy_cloud_policy_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698