Chromium Code Reviews| 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 d26c8784b5498cdeacd1ec042a967b6a31e8b055..604b5303576eec9c265677c930ead722eaa9dc13 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" |
| @@ -185,11 +187,16 @@ void RegisterSTHSetComponent(ComponentUpdateService* cus, |
| const base::FilePath& user_data_dir) { |
| DVLOG(1) << "Registering STH Set fetcher component."; |
| - // TODO(eranm): The next step in auditing CT logs (crbug.com/506227) is to |
| - // pass the distributor to the IOThread so it can be used in a per-profile |
| - // context for checking inclusion of SCTs. |
| scoped_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()); |
|
Ryan Sleevi
2016/04/21 14:05:15
This defeats the abstraction of lines 195-196 (con
Eran Messeri
2016/04/25 14:50:59
Apologies, but I am not sure I understand this com
Ryan Sleevi
2016/04/27 23:05:58
Yes.
The point of using content::BrowserThread::P
|
| + content::BrowserThread::PostTask( |
| + content::BrowserThread::IO, FROM_HERE, |
| + base::Bind(&IOThread::RegisterSTHReporter, |
| + base::Unretained(g_browser_process->io_thread()), |
|
Ryan Sleevi
2016/04/21 14:05:15
g_browser_process has an incredibly high bar to ju
Eran Messeri
2016/04/25 14:50:59
I'm trying to share an STHDistributor instance bet
Ryan Sleevi
2016/04/27 23:05:58
Having objects live on multiple threads - whether
Sorin Jianu
2016/05/05 00:32:03
I have a minor concern regarding a coupling issue
|
| + distributor.get())); |
| scoped_ptr<ComponentInstallerTraits> traits( |
| new STHSetComponentInstallerTraits(std::move(distributor))); |