Index: chrome/browser/component_updater/ev_whitelist_component_installer.cc |
diff --git a/chrome/browser/component_updater/ev_whitelist_component_installer.cc b/chrome/browser/component_updater/ev_whitelist_component_installer.cc |
index 90580784c025ccc4d943dd78466e1ccad4291333..da8951d408185fdc6760b238459b5aa7f629138b 100644 |
--- a/chrome/browser/component_updater/ev_whitelist_component_installer.cc |
+++ b/chrome/browser/component_updater/ev_whitelist_component_installer.cc |
@@ -13,6 +13,7 @@ |
#include "base/lazy_instance.h" |
#include "base/logging.h" |
#include "base/path_service.h" |
+#include "chrome/browser/net/packed_ct_ev_whitelist.h" |
#include "components/component_updater/component_updater_paths.h" |
#include "content/public/browser/browser_thread.h" |
#include "net/ssl/ssl_config_service.h" |
@@ -35,7 +36,12 @@ const uint8_t kPublicKeySHA256[32] = { |
const char kEVWhitelistManifestName[] = "EV Certs CT whitelist"; |
-EVWhitelistComponentInstallerTraits::EVWhitelistComponentInstallerTraits() { |
+EVWhitelistComponentInstallerTraits::EVWhitelistComponentInstallerTraits( |
+ net::SSLConfigService* ssl_config_service) |
+ : ssl_config_service_(ssl_config_service) { |
+} |
+ |
+EVWhitelistComponentInstallerTraits::~EVWhitelistComponentInstallerTraits() { |
} |
bool EVWhitelistComponentInstallerTraits::CanAutoUpdate() const { |
@@ -65,16 +71,10 @@ void EVWhitelistComponentInstallerTraits::ComponentReady( |
VLOG(1) << "Component ready, version " << version.GetString() << " in " |
<< path.value(); |
- // TODO(eranm): Uncomment once https://codereview.chromium.org/462543002/ |
- // is in. |
- /* |
const base::FilePath whitelist_file = GetInstalledPath(path); |
- base::Callback<void(void)> set_cb = |
- base::Bind(&net::ct::SetEVWhitelistFromFile, whitelist_file); |
content::BrowserThread::PostBlockingPoolTask( |
FROM_HERE, |
- set_cb); |
- */ |
+ base::Bind(&SetEVWhitelistFromFile, whitelist_file, ssl_config_service_)); |
} |
bool EVWhitelistComponentInstallerTraits::VerifyInstallation( |
@@ -113,11 +113,12 @@ std::string EVWhitelistComponentInstallerTraits::GetName() const { |
return kEVWhitelistManifestName; |
} |
-void RegisterEVWhitelistComponent(ComponentUpdateService* cus) { |
+void RegisterEVWhitelistComponent(ComponentUpdateService* cus, |
+ net::SSLConfigService* ssl_config_service) { |
VLOG(1) << "Registering EV whitelist component."; |
scoped_ptr<ComponentInstallerTraits> traits( |
- new EVWhitelistComponentInstallerTraits()); |
+ new EVWhitelistComponentInstallerTraits(ssl_config_service)); |
// |cus| will take ownership of |installer| during installer->Register(cus). |
DefaultComponentInstaller* installer = |
new DefaultComponentInstaller(traits.Pass()); |