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

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

Issue 148183013: Use per-user nssdb in onc certificate importer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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/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 9665fcc684349a45d1b56fe0435d8bab2084580b..03aab595568d5de12b955644d25c772bcad2f4f3 100644
--- a/chrome/browser/chromeos/policy/network_configuration_updater.h
+++ b/chrome/browser/chromeos/policy/network_configuration_updater.h
@@ -27,6 +27,10 @@ class CertificateImporter;
}
}
+namespace net {
+class NSSCertDatabase;
+}
+
namespace policy {
class PolicyMap;
@@ -47,6 +51,10 @@ class NetworkConfigurationUpdater : public PolicyService::Observer {
const PolicyMap& current) OVERRIDE;
virtual void OnPolicyServiceInitialized(PolicyDomain domain) OVERRIDE;
+ // Sets the database that should be used for importing certificates. It
+ // reapplies the policy if policy service is already initialized.
+ void SetCertDatabase(net::NSSCertDatabase* cert_database);
+
protected:
NetworkConfigurationUpdater(
onc::ONCSource onc_source,
@@ -58,7 +66,8 @@ class NetworkConfigurationUpdater : public PolicyService::Observer {
virtual void Init();
// Imports the certificates part of the policy.
- virtual void ImportCertificates(const base::ListValue& certificates_onc) = 0;
+ virtual void ImportCertificates(const base::ListValue& certificates_onc,
+ net::NSSCertDatabase* target_nssdb) = 0;
// Pushes the network part of the policy to the
// ManagedNetworkConfigurationHandler. This can be overridden by subclasses to
@@ -91,6 +100,11 @@ class NetworkConfigurationUpdater : public PolicyService::Observer {
// Used to retrieve the policies.
PolicyService* policy_service_;
+ // Certificate database to which certificates specified in policy should be
+ // imported. If not set, |ImportCertificates| will not be called during
+ // |ApplyPolicy|.
+ net::NSSCertDatabase* cert_database_;
+
DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationUpdater);
};

Powered by Google App Engine
This is Rietveld 408576698