Cleanup BrowserPluginEmbedder
[chromium-blink-merge.git] / chrome / browser / policy / chrome_browser_policy_connector.h
blob78c822402f7b3c8c2d6d395445a4b486cb6719f5
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 CHROME_BROWSER_POLICY_CHROME_BROWSER_POLICY_CONNECTOR_H_
6 #define CHROME_BROWSER_POLICY_CHROME_BROWSER_POLICY_CONNECTOR_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "components/policy/core/browser/browser_policy_connector.h"
12 class PrefService;
14 namespace net {
15 class URLRequestContextGetter;
18 namespace policy {
20 class ConfigurationPolicyProvider;
22 // Extends BrowserPolicyConnector with the setup shared among the desktop
23 // implementations and Android.
24 class ChromeBrowserPolicyConnector : public BrowserPolicyConnector {
25 public:
26 // Service initialization delay time in millisecond on startup. (So that
27 // displaying Chrome's GUI does not get delayed.)
28 static const int64 kServiceInitializationStartupDelay = 5000;
30 // Builds an uninitialized ChromeBrowserPolicyConnector, suitable for testing.
31 // Init() should be called to create and start the policy machinery.
32 ChromeBrowserPolicyConnector();
34 ~ChromeBrowserPolicyConnector() override;
36 void Init(
37 PrefService* local_state,
38 scoped_refptr<net::URLRequestContextGetter> request_context) override;
40 private:
41 ConfigurationPolicyProvider* CreatePlatformProvider();
43 // Appends any required flags if certain policies are set.
44 // TODO(guohui): Needs to move this to a more proper place and also to handle
45 // dynamic refresh.
46 void AppendExtraFlagsPerPolicy();
48 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserPolicyConnector);
51 } // namespace policy
53 #endif // CHROME_BROWSER_POLICY_CHROME_BROWSER_POLICY_CONNECTOR_H_