Index: chrome/browser/chrome_browser_main.cc |
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
index 239885bbbb2db46ae6eb1386d6be15526e9029b0..3f65f354c154e4b87a7a033b43048d576a404096 100644 |
--- a/chrome/browser/chrome_browser_main.cc |
+++ b/chrome/browser/chrome_browser_main.cc |
@@ -110,6 +110,7 @@ |
#include "components/rappor/rappor_service.h" |
#include "components/signin/core/common/profile_management_switches.h" |
#include "components/startup_metric_utils/startup_metric_utils.h" |
+#include "components/translate/content/browser/browser_cld_utils.h" |
#include "components/translate/content/common/cld_data_source.h" |
#include "components/translate/core/browser/translate_download_manager.h" |
#include "components/variations/net/variations_http_header_provider.h" |
@@ -421,9 +422,9 @@ void RegisterComponentsForUpdate() { |
g_browser_process->pnacl_component_installer()->RegisterPnaclComponent(cus); |
#endif |
- if (translate::CldDataSource::ShouldRegisterForComponentUpdates()) { |
- RegisterCldComponent(cus); |
- } |
+ // Registration of the CLD Component is a no-op unless the CLD data source has |
+ // been configured to be the "Component" data source. |
+ RegisterCldComponent(cus); |
base::FilePath path; |
if (PathService::Get(chrome::DIR_USER_DATA, &path)) { |
@@ -1502,6 +1503,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
// http://crbug.com/105065. |
browser_process_->notification_ui_manager(); |
+ // This must be called prior to RegisterComponentsForUpdate, in case the CLD |
+ // data source is based on the Component Updater. |
+ translate::BrowserCldUtils::ConfigureDefaultDataProvider(); |
+ |
if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) |
RegisterComponentsForUpdate(); |