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

Unified Diff: chrome/browser/component_updater/ev_whitelist_component_installer.cc

Issue 782333002: Certificate Transparency: Adding finch and NetLog logging for EV certs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing review comments Created 6 years 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
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4f30bdb9ad44236955b34f8bb26111c90f214c0d..bb5881c3d99de565e677445b8d0d6016ef02f2a0 100644
--- a/chrome/browser/component_updater/ev_whitelist_component_installer.cc
+++ b/chrome/browser/component_updater/ev_whitelist_component_installer.cc
@@ -14,6 +14,7 @@
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "base/path_service.h"
+#include "base/version.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"
@@ -30,7 +31,8 @@ base::FilePath GetEVWhitelistFilePath(const base::FilePath& base_path) {
}
void UpdateNewWhitelistData(const base::FilePath& new_whitelist_file,
- const base::FilePath& stored_whitelist_path) {
+ const base::FilePath& stored_whitelist_path,
+ const base::Version& version) {
VLOG(1) << "Reading new EV whitelist from file: "
<< new_whitelist_file.value();
std::string compressed_list;
@@ -40,7 +42,7 @@ void UpdateNewWhitelistData(const base::FilePath& new_whitelist_file,
}
scoped_refptr<net::ct::EVCertsWhitelist> new_whitelist(
- new PackedEVCertsWhitelist(compressed_list));
+ new PackedEVCertsWhitelist(compressed_list, version));
if (!new_whitelist->IsValid()) {
VLOG(1) << "Failed uncompressing EV certs whitelist.";
return;
@@ -70,8 +72,12 @@ void DoInitialLoadFromDisk(const base::FilePath& stored_whitelist_path) {
return;
}
+ // The version number is unknown as the list is loaded from disk, not
+ // the component.
+ // In practice very quickly the component updater will call ComponentReady
+ // which will have a valid version.
scoped_refptr<net::ct::EVCertsWhitelist> new_whitelist(
- new PackedEVCertsWhitelist(compressed_list));
+ new PackedEVCertsWhitelist(compressed_list, Version()));
if (!new_whitelist->IsValid()) {
VLOG(1) << "Failed uncompressing EV certs whitelist.";
return;
@@ -128,8 +134,8 @@ void EVWhitelistComponentInstallerTraits::ComponentReady(
const base::FilePath whitelist_file = GetInstalledPath(path);
content::BrowserThread::PostBlockingPoolTask(
- FROM_HERE,
- base::Bind(&UpdateNewWhitelistData, whitelist_file, ev_whitelist_path_));
+ FROM_HERE, base::Bind(&UpdateNewWhitelistData, whitelist_file,
+ ev_whitelist_path_, version));
}
bool EVWhitelistComponentInstallerTraits::VerifyInstallation(
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698