Index: chrome/browser/chrome_browser_main.cc |
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
index 6ab5340fc15c65e8b1683dcbaadd3f2439c3e8b8..6ffe3c512b9073d3d44952edf02ff8c1f88cedf1 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" |
@@ -416,7 +417,8 @@ void RegisterComponentsForUpdate() { |
g_browser_process->pnacl_component_installer()->RegisterPnaclComponent(cus); |
#endif |
- if (translate::CldDataSource::ShouldRegisterForComponentUpdates()) { |
+ if (translate::CldDataSource::Get() == |
+ translate::CldDataSource::GetComponentDataSource()) { |
RegisterCldComponent(cus); |
} |
@@ -1488,6 +1490,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(); |