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

Side by Side Diff: chrome/browser/policy/browser_policy_connector.h

Issue 13532005: Added a PolicyCertVerifier that uses the trust anchors from the ONC policies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: skip tests when NSS version is too old Created 7 years, 8 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ 5 #ifndef CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_
6 #define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ 6 #define CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" 14 #include "chrome/browser/policy/cloud/cloud_policy_constants.h"
15 #include "chrome/browser/policy/configuration_policy_handler_list.h" 15 #include "chrome/browser/policy/configuration_policy_handler_list.h"
16 16
17 #if defined(OS_CHROMEOS) 17 #if defined(OS_CHROMEOS)
18 #include "chrome/browser/chromeos/policy/proxy_policy_provider.h" 18 #include "chrome/browser/chromeos/policy/proxy_policy_provider.h"
19 #endif 19 #endif
20 20
21 class PrefRegistrySimple; 21 class PrefRegistrySimple;
22 class PrefRegistrySyncable;
22 class PrefService; 23 class PrefService;
23 class Profile; 24 class Profile;
24 25
25 namespace net { 26 namespace net {
27 class CertTrustAnchorProvider;
26 class URLRequestContextGetter; 28 class URLRequestContextGetter;
27 } 29 }
28 30
29 namespace policy { 31 namespace policy {
30 32
31 class ConfigurationPolicyProvider; 33 class ConfigurationPolicyProvider;
32 class DeviceManagementService; 34 class DeviceManagementService;
33 class PolicyService; 35 class PolicyService;
34 class PolicyStatisticsCollector; 36 class PolicyStatisticsCollector;
35 37
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 114
113 DeviceManagementService* device_management_service() { 115 DeviceManagementService* device_management_service() {
114 return device_management_service_.get(); 116 return device_management_service_.get();
115 } 117 }
116 118
117 #if defined(OS_CHROMEOS) 119 #if defined(OS_CHROMEOS)
118 AppPackUpdater* GetAppPackUpdater(); 120 AppPackUpdater* GetAppPackUpdater();
119 121
120 NetworkConfigurationUpdater* GetNetworkConfigurationUpdater(); 122 NetworkConfigurationUpdater* GetNetworkConfigurationUpdater();
121 123
124 net::CertTrustAnchorProvider* GetCertTrustAnchorProvider();
125
122 DeviceCloudPolicyManagerChromeOS* GetDeviceCloudPolicyManager() { 126 DeviceCloudPolicyManagerChromeOS* GetDeviceCloudPolicyManager() {
123 return device_cloud_policy_manager_.get(); 127 return device_cloud_policy_manager_.get();
124 } 128 }
125 UserCloudPolicyManagerChromeOS* GetUserCloudPolicyManager() { 129 UserCloudPolicyManagerChromeOS* GetUserCloudPolicyManager() {
126 return user_cloud_policy_manager_.get(); 130 return user_cloud_policy_manager_.get();
127 } 131 }
128 DeviceLocalAccountPolicyService* GetDeviceLocalAccountPolicyService() { 132 DeviceLocalAccountPolicyService* GetDeviceLocalAccountPolicyService() {
129 return device_local_account_policy_service_.get(); 133 return device_local_account_policy_service_.get();
130 } 134 }
131 EnterpriseInstallAttributes* GetInstallAttributes() { 135 EnterpriseInstallAttributes* GetInstallAttributes() {
(...skipping 17 matching lines...) Expand all
149 153
150 // Gets the URL of the DM server (either the default or a URL provided via the 154 // Gets the URL of the DM server (either the default or a URL provided via the
151 // command line). 155 // command line).
152 static std::string GetDeviceManagementUrl(); 156 static std::string GetDeviceManagementUrl();
153 157
154 // Check whether a user is known to be non-enterprise. Domains such as 158 // Check whether a user is known to be non-enterprise. Domains such as
155 // gmail.com and googlemail.com are known to not be managed. Also returns 159 // gmail.com and googlemail.com are known to not be managed. Also returns
156 // false if the username is empty. 160 // false if the username is empty.
157 static bool IsNonEnterpriseUser(const std::string& username); 161 static bool IsNonEnterpriseUser(const std::string& username);
158 162
163 // Returns true if |profile| has used certificates installed via policy
164 // to establish a secure connection before. This means that it may have
165 // cached content from an untrusted source.
166 static bool UsedPolicyCertificates(Profile* profile);
167
159 // Registers refresh rate prefs. 168 // Registers refresh rate prefs.
160 static void RegisterPrefs(PrefRegistrySimple* registry); 169 static void RegisterPrefs(PrefRegistrySimple* registry);
161 170
171 // Registers Profile prefs related to policy features.
172 static void RegisterUserPrefs(PrefRegistrySyncable* registry);
173
162 private: 174 private:
163 // Set the timezone as soon as the policies are available. 175 // Set the timezone as soon as the policies are available.
164 void SetTimezoneIfPolicyAvailable(); 176 void SetTimezoneIfPolicyAvailable();
165 177
166 // Creates a new PolicyService with the shared policy providers and the given 178 // Creates a new PolicyService with the shared policy providers and the given
167 // |user_cloud_policy_provider| and |managed_mode_policy_provider|, which are 179 // |user_cloud_policy_provider| and |managed_mode_policy_provider|, which are
168 // optional. 180 // optional.
169 scoped_ptr<PolicyService> CreatePolicyServiceWithProviders( 181 scoped_ptr<PolicyService> CreatePolicyServiceWithProviders(
170 ConfigurationPolicyProvider* user_cloud_policy_provider, 182 ConfigurationPolicyProvider* user_cloud_policy_provider,
171 ConfigurationPolicyProvider* managed_mode_policy_provider); 183 ConfigurationPolicyProvider* managed_mode_policy_provider);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 scoped_ptr<AppPackUpdater> app_pack_updater_; 232 scoped_ptr<AppPackUpdater> app_pack_updater_;
221 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_; 233 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_;
222 #endif 234 #endif
223 235
224 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector); 236 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnector);
225 }; 237 };
226 238
227 } // namespace policy 239 } // namespace policy
228 240
229 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_ 241 #endif // CHROME_BROWSER_POLICY_BROWSER_POLICY_CONNECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698