diff options
author | andrewhayden@chromium.org <andrewhayden@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-30 11:56:26 +0000 |
---|---|---|
committer | andrewhayden@chromium.org <andrewhayden@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-30 11:56:26 +0000 |
commit | 3cb7c2b55cfa24ae40cd49a1d8fd15275b55dd0b (patch) | |
tree | af77160cb2faad51612d5bd950154e924be1a3ba /chrome/browser/chrome_browser_main.cc | |
parent | 77344cd910e3297713903431518a5f3cb154695c (diff) | |
download | chromium_src-3cb7c2b55cfa24ae40cd49a1d8fd15275b55dd0b.zip chromium_src-3cb7c2b55cfa24ae40cd49a1d8fd15275b55dd0b.tar.gz chromium_src-3cb7c2b55cfa24ae40cd49a1d8fd15275b55dd0b.tar.bz2 |
Replace the use of CLD_DATA_FROM* and CLD-related ifdefs with runtime checks.
This, along with other changes described in crbug/367239, allows refactoring
of the build logic to allow per-target customization of the CLD data source.
This, in turn, allows chrome_shell to be built with statically-linked CLD even
if other things (such as the full browser) are not.
BUG=367239
TBR=toyoshim@chromium.org
Review URL: https://codereview.chromium.org/424123003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286487 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_browser_main.cc')
-rw-r--r-- | chrome/browser/chrome_browser_main.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 3d48335..8c1a58a 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/common/cld_data_source.h" #include "components/translate/core/browser/translate_download_manager.h" #include "components/variations/variations_http_header_provider.h" #include "content/public/browser/browser_thread.h" @@ -395,9 +396,9 @@ void RegisterComponentsForUpdate() { g_browser_process->pnacl_component_installer()->RegisterPnaclComponent(cus); #endif -#if defined(CLD_DATA_FROM_COMPONENT) - RegisterCldComponent(cus); -#endif + if (translate::CldDataSource::ShouldRegisterForComponentUpdates()) { + RegisterCldComponent(cus); + } base::FilePath path; if (PathService::Get(chrome::DIR_USER_DATA, &path)) { |