7a065e2675e568f8fd30dad62de0920498f144c0
[platform/framework/web/crosswalk.git] / src / chrome / browser / policy / chrome_browser_policy_connector.h
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.
4
5 #ifndef CHROME_BROWSER_POLICY_CHROME_BROWSER_POLICY_CONNECTOR_H_
6 #define CHROME_BROWSER_POLICY_CHROME_BROWSER_POLICY_CONNECTOR_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "components/policy/core/browser/browser_policy_connector.h"
11
12 class PrefService;
13
14 namespace net {
15 class URLRequestContextGetter;
16 }
17
18 namespace policy {
19
20 class ConfigurationPolicyProvider;
21
22 // Extends BrowserPolicyConnector with the setup shared among the desktop
23 // implementations and Android.
24 class ChromeBrowserPolicyConnector : public BrowserPolicyConnector {
25  public:
26   // Builds an uninitialized ChromeBrowserPolicyConnector, suitable for testing.
27   // Init() should be called to create and start the policy machinery.
28   ChromeBrowserPolicyConnector();
29
30   virtual ~ChromeBrowserPolicyConnector();
31
32   virtual void Init(
33       PrefService* local_state,
34       scoped_refptr<net::URLRequestContextGetter> request_context) OVERRIDE;
35
36  private:
37   ConfigurationPolicyProvider* CreatePlatformProvider();
38
39   DISALLOW_COPY_AND_ASSIGN(ChromeBrowserPolicyConnector);
40 };
41
42 }  // namespace policy
43
44 #endif  // CHROME_BROWSER_POLICY_CHROME_BROWSER_POLICY_CONNECTOR_H_