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

Unified Diff: chrome/browser/policy/browser_policy_connector.h

Issue 6520008: Device policy infrastructure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
Index: chrome/browser/policy/browser_policy_connector.h
diff --git a/chrome/browser/policy/browser_policy_connector.h b/chrome/browser/policy/browser_policy_connector.h
new file mode 100644
index 0000000000000000000000000000000000000000..8dd8619e0400710503ba01087095babd59457b41
--- /dev/null
+++ b/chrome/browser/policy/browser_policy_connector.h
@@ -0,0 +1,68 @@
+// Copyright (c) 2011 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 CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_
+#define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/scoped_ptr.h"
+
+class PrefService;
+class TestingBrowserProcess;
+class TokenService;
+class URLRequestContextGetter;
+
+namespace policy {
+
+class CloudPolicySubsystem;
+class CloudPolicyIdentityStrategy;
Mattias Nissler (ping if slow) 2011/02/15 10:15:16 alphabetize
Jakob Kummerow 2011/02/21 12:12:15 Done.
+class ConfigurationPolicyProvider;
+
+// Manages the lifecycle of browser-global policy infrastructure, such as the
+// platform policy providers.
+class BrowserPolicyConnector {
+ public:
+ BrowserPolicyConnector();
+ ~BrowserPolicyConnector();
+
+ // Activates the cloud policy context. We can't pass these in the constructor
gfeher 2011/02/14 17:28:50 context->connector?
Jakob Kummerow 2011/02/21 12:12:15 Done.
+ // since the context must start up before threading and net is up.
danno 2011/02/15 12:27:15 context->connector here, too.
Jakob Kummerow 2011/02/21 12:12:15 Done.
+ void Initialize(PrefService* local_state,
+ URLRequestContextGetter* request_context);
+
+ ConfigurationPolicyProvider* GetManagedPlatformProvider() const;
+ ConfigurationPolicyProvider* GetManagedCloudProvider() const;
+ ConfigurationPolicyProvider* GetRecommendedPlatformProvider() const;
+ ConfigurationPolicyProvider* GetRecommendedCloudProvider() const;
+
+ static void RegisterPrefs(PrefService* user_prefs);
+
+ static const int kDefaultPolicyRefreshRateInMilliseconds =
+ 3 * 60 * 60 * 1000; // 3 hours.
+
+ private:
+ friend class ::TestingBrowserProcess;
+
+ static ConfigurationPolicyProvider* CreateManagedPlatformProvider();
+ static ConfigurationPolicyProvider* CreateRecommendedPlatformProvider();
+
+ // Constructor for tests that allows tests to use fake platform policy
+ // providers instead of using the actual ones.
+ BrowserPolicyConnector(
+ ConfigurationPolicyProvider* managed_platform_provider,
+ ConfigurationPolicyProvider* recommended_platform_provider);
+
+ scoped_ptr<ConfigurationPolicyProvider> managed_platform_provider_;
+ scoped_ptr<ConfigurationPolicyProvider> recommended_platform_provider_;
+
+ scoped_ptr<CloudPolicyIdentityStrategy> identity_strategy_;
+ scoped_ptr<CloudPolicySubsystem> cloud_policy_subsystem_;
+
+ DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector);
+};
+
+} // namespace policy
+
+#endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_

Powered by Google App Engine
This is Rietveld 408576698