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

Unified Diff: chrome/browser/chromeos/policy/network_configuration_updater.h

Issue 13035003: Added a PolicyCertVerifier that uses the trust anchors from the ONC policies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed non-chromeos builds Created 7 years, 9 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/chromeos/policy/network_configuration_updater.h
diff --git a/chrome/browser/chromeos/policy/network_configuration_updater.h b/chrome/browser/chromeos/policy/network_configuration_updater.h
index bd0bcd94619a928c0df5c7d04a71b36da042947d..672cdcfb8e5739d296aa26c3b390bb5339f1299d 100644
--- a/chrome/browser/chromeos/policy/network_configuration_updater.h
+++ b/chrome/browser/chromeos/policy/network_configuration_updater.h
@@ -17,6 +17,10 @@ namespace base {
class Value;
}
+namespace net {
+class CertTrustAnchorProvider;
+}
+
namespace policy {
class PolicyMap;
@@ -49,7 +53,18 @@ class NetworkConfigurationUpdater
// request it.
void set_allow_web_trust(bool allow) { allow_web_trust_ = allow; }
+ // Returns a CertTrustAnchorProvider that provides the list of server and
+ // CA certificates with the Web trust flag set that were retrieved from the
+ // last user ONC policy update.
+ // This getter must be used on UI, and the provider must be used on IO. It
+ // is only valid as long as the NetworkConfigurationUpdater is valid; the
+ // NetworkConfigurationUpdater outlives all the profiles, and deletes the
+ // provider on the IO thread.
+ net::CertTrustAnchorProvider* GetCertTrustAnchorProvider();
+
private:
+ class CertTrustAnchorProviderImpl;
+
// Callback that's called by |policy_service_| if the respective ONC policy
// changed.
void OnPolicyChanged(chromeos::onc::ONCSource onc_source,
@@ -81,6 +96,10 @@ class NetworkConfigurationUpdater
// The policy service storing the ONC policies.
PolicyService* policy_service_;
+ // An implementation of CertTrustAnchorProvider. Owned by the updater, but
+ // lives on the IO thread.
+ CertTrustAnchorProviderImpl* cert_trust_provider_;
+
DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationUpdater);
};

Powered by Google App Engine
This is Rietveld 408576698