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

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

Issue 6520008: Device policy infrastructure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Mattias' comments 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/profile_policy_connector.h
diff --git a/chrome/browser/policy/profile_policy_connector.h b/chrome/browser/policy/profile_policy_connector.h
new file mode 100644
index 0000000000000000000000000000000000000000..451fbfe516fac6ec2f30b5bfc37ac63c614f17eb
--- /dev/null
+++ b/chrome/browser/policy/profile_policy_connector.h
@@ -0,0 +1,56 @@
+// 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_PROFILE_POLICY_CONNECTOR_H_
+#define CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_
+#pragma once
+
+#include "base/basictypes.h"
+#include "base/scoped_ptr.h"
+
+class Profile;
+
+namespace policy {
+
+class CloudPolicySubsystem;
+class ConfigurationPolicyProvider;
+class UserPolicyIdentityStrategy;
+
+// This class is a container for the profile-specific policy bits located in the
+// profile. Since the subsystem owns the policy provider, it's vital that it
+// gets initialized before the profile's prefs and destroyed after the prefs
+// are gone.
+class ProfilePolicyConnector {
+ public:
+ explicit ProfilePolicyConnector(Profile* profile);
+ ~ProfilePolicyConnector();
+
+ // Initializes the context. Should be called only after the profile's request
+ // context is up.
+ void Initialize();
+
+ // Shuts the context down. This must be called before the networking
+ // infrastructure in the profile goes away.
+ void Shutdown();
+
+ ConfigurationPolicyProvider* GetManagedCloudProvider();
+ ConfigurationPolicyProvider* GetRecommendedCloudProvider();
+
+ static void RegisterPrefs(PrefService* user_prefs);
+
+ static const int kDefaultPolicyRefreshRateInMilliseconds =
+ 3 * 60 * 60 * 1000; // 3 hours.
+
+ private:
+ Profile* profile_;
+
+ scoped_ptr<UserPolicyIdentityStrategy> identity_strategy;
gfeher 2011/02/22 13:45:42 Nit: please append underscore to the end of the na
Jakob Kummerow 2011/02/22 16:53:58 Done.
+ scoped_ptr<CloudPolicySubsystem> cloud_policy_subsystem_;
+
+ DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnector);
+};
+
+} // namespace policy
+
+#endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_

Powered by Google App Engine
This is Rietveld 408576698