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

Unified Diff: components/policy/core/common/policy_provider_android.h

Issue 155923002: Add a platform policy provider for Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 6 years, 10 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 | « components/components_tests.gyp ('k') | components/policy/core/common/policy_provider_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/core/common/policy_provider_android.h
diff --git a/components/policy/core/common/policy_provider_android.h b/components/policy/core/common/policy_provider_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..f2fbefb493f1c2460f5a2e7413ef7052de0408df
--- /dev/null
+++ b/components/policy/core/common/policy_provider_android.h
@@ -0,0 +1,45 @@
+// Copyright 2014 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 COMPONENTS_POLICY_CORE_COMMON_POLICY_PROVIDER_ANDROID_H_
+#define COMPONENTS_POLICY_CORE_COMMON_POLICY_PROVIDER_ANDROID_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "components/policy/core/common/configuration_policy_provider.h"
+
+namespace policy {
+
+class PolicyProviderAndroidDelegate;
+
+// Provider for policies set by the Android platform.
+class POLICY_EXPORT PolicyProviderAndroid : public ConfigurationPolicyProvider {
+ public:
+ PolicyProviderAndroid();
+ virtual ~PolicyProviderAndroid();
+
+ // Call this method to tell the policy system whether it should wait for
+ // policies to be loaded by this provider. If this method is called,
+ // IsInitializationComplete() will only return true after SetPolicies() has
+ // been called at least once, otherwise it will return true immediately.
+ static void SetShouldWaitForPolicy(bool should_wait_for_policy);
+
+ void SetDelegate(PolicyProviderAndroidDelegate* delegate);
+ void SetPolicies(scoped_ptr<PolicyBundle> policy);
+
+ // ConfigurationPolicyProvider:
+ virtual void Shutdown() OVERRIDE;
+ virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE;
+ virtual void RefreshPolicies() OVERRIDE;
+
+ private:
+ PolicyProviderAndroidDelegate* delegate_;
+ bool initialized_;
+
+ DISALLOW_COPY_AND_ASSIGN(PolicyProviderAndroid);
+};
+
+} // namespace policy
+
+#endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_PROVIDER_ANDROID_H_
« no previous file with comments | « components/components_tests.gyp ('k') | components/policy/core/common/policy_provider_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698