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

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

Issue 1845113003: Certificate Transparency: Start tracking logs' state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Catching up with master Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/component_updater/sth_set_component_installer.cc
diff --git a/chrome/browser/component_updater/sth_set_component_installer.cc b/chrome/browser/component_updater/sth_set_component_installer.cc
index fc393ceff3dc209cd2a4dc4d113a438ace725b97..99778124ebb77a8fd10a0cb17c6873b069181755 100644
--- a/chrome/browser/component_updater/sth_set_component_installer.cc
+++ b/chrome/browser/component_updater/sth_set_component_installer.cc
@@ -15,6 +15,8 @@
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
#include "base/version.h"
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/io_thread.h"
#include "components/component_updater/component_updater_paths.h"
#include "components/safe_json/safe_json_parser.h"
#include "content/public/browser/browser_thread.h"
@@ -189,6 +191,14 @@ void RegisterSTHSetComponent(ComponentUpdateService* cus,
// context for checking inclusion of SCTs.
std::unique_ptr<net::ct::STHDistributor> distributor(
new net::ct::STHDistributor());
+ // Register the distributor as the STHReporter for the IOThread (see
+ // crbug.com/506227 for details).
+ DCHECK(g_browser_process->io_thread());
+ content::BrowserThread::PostTask(
+ content::BrowserThread::IO, FROM_HERE,
+ base::Bind(&IOThread::RegisterSTHReporter,
+ base::Unretained(g_browser_process->io_thread()),
+ distributor.get()));
std::unique_ptr<ComponentInstallerTraits> traits(
new STHSetComponentInstallerTraits(std::move(distributor)));
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/io_thread.h » ('j') | chrome/browser/io_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698