Add abhijeet.k@samsung.com to AUTHORS list.
[chromium-blink-merge.git] / components / policy / core / common / policy_provider_android.h
blob76bc515b5b68b765f445f4e240e031b32cceea13
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_PROVIDER_ANDROID_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_PROVIDER_ANDROID_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "components/policy/core/common/configuration_policy_provider.h"
12 namespace policy {
14 class PolicyProviderAndroidDelegate;
15 class Schema;
17 // Provider for policies set by the Android platform.
18 class POLICY_EXPORT PolicyProviderAndroid : public ConfigurationPolicyProvider {
19 public:
20 PolicyProviderAndroid();
21 ~PolicyProviderAndroid() override;
23 // Call this method to tell the policy system whether it should wait for
24 // policies to be loaded by this provider. If this method is called,
25 // IsInitializationComplete() will only return true after SetPolicies() has
26 // been called at least once, otherwise it will return true immediately.
27 static void SetShouldWaitForPolicy(bool should_wait_for_policy);
29 // Returns the schema for Chrome policies.
30 const Schema* GetChromeSchema() const;
32 void SetDelegate(PolicyProviderAndroidDelegate* delegate);
33 void SetPolicies(scoped_ptr<PolicyBundle> policy);
35 // ConfigurationPolicyProvider:
36 void Shutdown() override;
37 bool IsInitializationComplete(PolicyDomain domain) const override;
38 void RefreshPolicies() override;
40 private:
41 PolicyProviderAndroidDelegate* delegate_;
42 bool initialized_;
44 DISALLOW_COPY_AND_ASSIGN(PolicyProviderAndroid);
47 } // namespace policy
49 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_PROVIDER_ANDROID_H_