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

Side by Side 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: fix nits 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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_PROFILE_POLICY_CONNECTOR_H_
6 #define CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/scoped_ptr.h"
11
12 class Profile;
13
14 namespace policy {
15
16 class CloudPolicySubsystem;
17 class ConfigurationPolicyProvider;
18 class UserPolicyIdentityStrategy;
19
20 // This class is a container for the profile-specific policy bits located in the
21 // profile. Since the subsystem owns the policy provider, it's vital that it
22 // gets initialized before the profile's prefs and destroyed after the prefs
23 // are gone.
24 class ProfilePolicyConnector {
25 public:
26 explicit ProfilePolicyConnector(Profile* profile);
27 ~ProfilePolicyConnector();
28
29 // Initializes the context. Should be called only after the profile's request
30 // context is up.
31 void Initialize();
32
33 // Shuts the context down. This must be called before the networking
34 // infrastructure in the profile goes away.
35 void Shutdown();
36
37 ConfigurationPolicyProvider* GetManagedCloudProvider();
38 ConfigurationPolicyProvider* GetRecommendedCloudProvider();
39
40 static void RegisterPrefs(PrefService* user_prefs);
41
42 static const int kDefaultPolicyRefreshRateInMilliseconds =
43 3 * 60 * 60 * 1000; // 3 hours.
44
45 private:
46 Profile* profile_;
47
48 scoped_ptr<UserPolicyIdentityStrategy> identity_strategy_;
49 scoped_ptr<CloudPolicySubsystem> cloud_policy_subsystem_;
50
51 DISALLOW_COPY_AND_ASSIGN(ProfilePolicyConnector);
52 };
53
54 } // namespace policy
55
56 #endif // CHROME_BROWSER_POLICY_PROFILE_POLICY_CONNECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698