| 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..660e9ffa74199118eec0f9e761b5aa180736ed1d 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) {
|
| 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,12 @@ 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());
|
| + browser_process_->RegisterWithSTHObserver(distributor.get());
|
| + RegisterComponentsForUpdate(std::move(distributor));
|
| + }
|
|
|
| #if defined(OS_ANDROID)
|
| variations::VariationsService* variations_service =
|
|
|