Chromium Code Reviews| Index: chrome/browser/component_updater/cld_component_installer.cc |
| diff --git a/chrome/browser/component_updater/cld_component_installer.cc b/chrome/browser/component_updater/cld_component_installer.cc |
| index a761ee6988175c3479f5dc2b5d5f4c5eff7bda11..90090763fed9f3329572805c9f327ef511fd076d 100644 |
| --- a/chrome/browser/component_updater/cld_component_installer.cc |
| +++ b/chrome/browser/component_updater/cld_component_installer.cc |
| @@ -15,6 +15,7 @@ |
| #include "base/path_service.h" |
| #include "components/component_updater/component_updater_paths.h" |
| #include "components/translate/content/browser/browser_cld_data_provider.h" |
| +#include "components/translate/content/browser/browser_cld_data_provider_factory.h" |
| #include "components/translate/content/common/cld_data_source.h" |
| #include "content/public/browser/browser_thread.h" |
| #include "net/ssl/ssl_config_service.h" |
| @@ -108,10 +109,11 @@ std::string CldComponentInstallerTraits::GetName() const { |
| void RegisterCldComponent(ComponentUpdateService* cus) { |
| // Make sure we don't start up if the CLD data source isn't compatible. |
| - if (!translate::CldDataSource::ShouldRegisterForComponentUpdates()) { |
| + if (translate::CldDataSource::Get() != |
| + translate::CldDataSource::GetComponentDataSource()) { |
|
Takashi Toyoshima
2014/11/06 14:34:28
Can you have a browser test that can detect this s
Andrew Hayden (chromium.org)
2014/11/10 14:06:35
Sadly, there's not a way to have a test for this b
Takashi Toyoshima
2014/11/11 07:16:36
OK, it sounds reasonable.
|
| // This is a serious build-time configuration error. |
| LOG(ERROR) << "Wrong CLD data source: " << |
| - translate::CldDataSource::GetName(); |
| + translate::CldDataSource::Get()->GetName(); |
| NOTREACHED(); |
| return; |
| } |
| @@ -132,7 +134,7 @@ void CldComponentInstallerTraits::SetLatestCldDataFile( |
| const base::FilePath& path) { |
| VLOG(1) << "Setting CLD data file location: " << path.value(); |
| g_latest_cld_data_file.Get() = path; |
| - translate::SetCldDataFilePath(path); |
| + translate::CldDataSource::Get()->SetCldDataFilePath(path); |
| } |
| base::FilePath CldComponentInstallerTraits::GetLatestCldDataFile() { |