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

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

Issue 92133003: Move ForwardingPolicyProvider, etc. to components/policy/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 | chrome/browser/policy/forwarding_policy_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/forwarding_policy_provider.h
diff --git a/chrome/browser/policy/forwarding_policy_provider.h b/chrome/browser/policy/forwarding_policy_provider.h
deleted file mode 100644
index 1dcbfeed3a2d6c33489c6610f821a587af4bef1b..0000000000000000000000000000000000000000
--- a/chrome/browser/policy/forwarding_policy_provider.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2013 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_FORWARDING_POLICY_PROVIDER_H_
-#define CHROME_BROWSER_POLICY_FORWARDING_POLICY_PROVIDER_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "components/policy/core/common/configuration_policy_provider.h"
-#include "components/policy/core/common/policy_namespace.h"
-
-namespace policy {
-
-// A policy provider that forwards calls to another provider.
-// This provider also tracks the SchemaRegistry, and becomes ready after making
-// sure the delegate provider has refreshed its policies with an updated view
-// of the complete schema. It is expected that the delegate's SchemaRegistry
-// is a CombinedSchemaRegistry tracking the forwarding provider's registry.
-class ForwardingPolicyProvider : public ConfigurationPolicyProvider,
- public ConfigurationPolicyProvider::Observer {
- public:
- // The |delegate| must outlive this provider.
- explicit ForwardingPolicyProvider(ConfigurationPolicyProvider* delegate);
- virtual ~ForwardingPolicyProvider();
-
- // ConfigurationPolicyProvider:
- //
- // Note that Init() and Shutdown() are not forwarded to the |delegate_|, since
- // this provider does not own it and its up to the |delegate_|'s owner to
- // initialize it and shut it down.
- //
- // Note also that this provider may have a SchemaRegistry passed in Init()
- // that doesn't match the |delegate_|'s; therefore OnSchemaRegistryUpdated()
- // and OnSchemaRegistryReady() are not forwarded either. It is assumed that
- // the |delegate_|'s SchemaRegistry contains a superset of this provider's
- // SchemaRegistry though (i.e. it's a CombinedSchemaRegistry that contains
- // this provider's SchemaRegistry).
- //
- // This provider manages its own initialization state for all policy domains
- // except POLICY_DOMAIN_CHROME, whose status is always queried from the
- // |delegate_|. RefreshPolicies() calls are also forwarded, since this
- // provider doesn't have a "real" policy source of its own.
- virtual void Init(SchemaRegistry* registry) OVERRIDE;
- virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE;
- virtual void RefreshPolicies() OVERRIDE;
- virtual void OnSchemaRegistryReady() OVERRIDE;
- virtual void OnSchemaRegistryUpdated(bool has_new_schemas) OVERRIDE;
-
- // ConfigurationPolicyProvider::Observer:
- virtual void OnUpdatePolicy(ConfigurationPolicyProvider* provider) OVERRIDE;
-
- private:
- enum InitializationState {
- WAITING_FOR_REGISTRY_READY,
- WAITING_FOR_REFRESH,
- READY,
- };
-
- ConfigurationPolicyProvider* delegate_;
- InitializationState state_;
-
- DISALLOW_COPY_AND_ASSIGN(ForwardingPolicyProvider);
-};
-
-} // namespace policy
-
-#endif // CHROME_BROWSER_POLICY_FORWARDING_POLICY_PROVIDER_H_
« no previous file with comments | « no previous file | chrome/browser/policy/forwarding_policy_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698