Chromium Code Reviews| Index: chrome/browser/chrome_browser_main.cc |
| diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
| index 61723fabe97a7bec9423c992cbc780a2d318ec0b..34447f4f7ca737dbea2e122cf8c6b0076bf34c25 100644 |
| --- a/chrome/browser/chrome_browser_main.cc |
| +++ b/chrome/browser/chrome_browser_main.cc |
| @@ -50,6 +50,7 @@ |
| #include "chrome/browser/component_updater/ev_whitelist_component_installer.h" |
| #include "chrome/browser/component_updater/flash_component_installer.h" |
| #include "chrome/browser/component_updater/recovery_component_installer.h" |
| +#include "chrome/browser/component_updater/sth_set_component_installer.h" |
| #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h" |
| #include "chrome/browser/component_updater/swiftshader_component_installer.h" |
| #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" |
| @@ -150,6 +151,7 @@ |
| #include "grit/platform_locale_settings.h" |
| #include "media/base/media_resources.h" |
| #include "net/base/net_module.h" |
| +#include "net/cert/sth_distributor.h" |
| #include "net/cookies/cookie_monster.h" |
| #include "net/http/http_network_layer.h" |
| #include "net/http/http_stream_factory.h" |
| @@ -442,7 +444,8 @@ OSStatus KeychainCallback(SecKeychainEvent keychain_event, |
| } |
| #endif // defined(OS_MACOSX) |
| -void RegisterComponentsForUpdate() { |
| +void RegisterComponentsForUpdate( |
| + scoped_ptr<net::ct::STHDistributor> sth_distributor) { |
|
Sorin Jianu
2016/04/04 22:06:12
Small issue.
I wonder if we could avoid passing t
Eran Messeri
2016/04/05 15:34:06
This CL contains a bigger picture of the intended
|
| component_updater::ComponentUpdateService* cus = |
| g_browser_process->component_updater(); |
| @@ -489,6 +492,11 @@ void RegisterComponentsForUpdate() { |
| // 1. Android: Because it currently does not have the EV indicator. |
| // 2. Chrome OS: On Chrome OS this registration is delayed until user login. |
| RegisterEVWhitelistComponent(cus, path); |
| + |
| + // Registration of the STH set fetcher here is not done for: |
| + // Android: Because the story around CT on Mobile is not finalized yet. |
| + // Chrome OS: On Chrome OS this registration is delayed until user login. |
| + RegisterSTHSetComponent(cus, path, std::move(sth_distributor)); |
| #endif // defined(OS_ANDROID) |
| } |
| @@ -1707,8 +1715,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
| // data source is based on the Component Updater. |
| translate::BrowserCldUtils::ConfigureDefaultDataProvider(); |
| - if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) |
| - RegisterComponentsForUpdate(); |
| + if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) { |
| + scoped_ptr<net::ct::STHDistributor> distributor( |
| + new net::ct::STHDistributor()); |
| + // TODO(eranm): Pass the distributor to the IOThread so CT TreeStateTracker |
| + // instances can register for STH updates. |
| + RegisterComponentsForUpdate(std::move(distributor)); |
|
Sorin Jianu
2016/04/04 22:06:13
Would it be possible to handle this argument insid
Eran Messeri
2016/04/05 15:34:06
See my reply above; in https://codereview.chromium
|
| + } |
| #if defined(OS_ANDROID) |
| variations::VariationsService* variations_service = |