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

Side by Side Diff: components/policy/core/common/policy_provider_android.h

Issue 329143003: Add a method to PolicyProviderAndroid to return the Chrome policy schema. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | components/policy/core/common/policy_provider_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_PROVIDER_ANDROID_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_PROVIDER_ANDROID_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_PROVIDER_ANDROID_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_PROVIDER_ANDROID_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "components/policy/core/common/configuration_policy_provider.h" 10 #include "components/policy/core/common/configuration_policy_provider.h"
11 11
12 namespace policy { 12 namespace policy {
13 13
14 class PolicyProviderAndroidDelegate; 14 class PolicyProviderAndroidDelegate;
15 class Schema;
15 16
16 // Provider for policies set by the Android platform. 17 // Provider for policies set by the Android platform.
17 class POLICY_EXPORT PolicyProviderAndroid : public ConfigurationPolicyProvider { 18 class POLICY_EXPORT PolicyProviderAndroid : public ConfigurationPolicyProvider {
18 public: 19 public:
19 PolicyProviderAndroid(); 20 PolicyProviderAndroid();
20 virtual ~PolicyProviderAndroid(); 21 virtual ~PolicyProviderAndroid();
21 22
22 // Call this method to tell the policy system whether it should wait for 23 // Call this method to tell the policy system whether it should wait for
23 // policies to be loaded by this provider. If this method is called, 24 // policies to be loaded by this provider. If this method is called,
24 // IsInitializationComplete() will only return true after SetPolicies() has 25 // IsInitializationComplete() will only return true after SetPolicies() has
25 // been called at least once, otherwise it will return true immediately. 26 // been called at least once, otherwise it will return true immediately.
26 static void SetShouldWaitForPolicy(bool should_wait_for_policy); 27 static void SetShouldWaitForPolicy(bool should_wait_for_policy);
27 28
29 // Returns the schema for Chrome policies.
30 const Schema* GetChromeSchema() const;
31
28 void SetDelegate(PolicyProviderAndroidDelegate* delegate); 32 void SetDelegate(PolicyProviderAndroidDelegate* delegate);
29 void SetPolicies(scoped_ptr<PolicyBundle> policy); 33 void SetPolicies(scoped_ptr<PolicyBundle> policy);
30 34
31 // ConfigurationPolicyProvider: 35 // ConfigurationPolicyProvider:
32 virtual void Shutdown() OVERRIDE; 36 virtual void Shutdown() OVERRIDE;
33 virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE; 37 virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE;
34 virtual void RefreshPolicies() OVERRIDE; 38 virtual void RefreshPolicies() OVERRIDE;
35 39
36 private: 40 private:
37 PolicyProviderAndroidDelegate* delegate_; 41 PolicyProviderAndroidDelegate* delegate_;
38 bool initialized_; 42 bool initialized_;
39 43
40 DISALLOW_COPY_AND_ASSIGN(PolicyProviderAndroid); 44 DISALLOW_COPY_AND_ASSIGN(PolicyProviderAndroid);
41 }; 45 };
42 46
43 } // namespace policy 47 } // namespace policy
44 48
45 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_PROVIDER_ANDROID_H_ 49 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_PROVIDER_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | components/policy/core/common/policy_provider_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698