summaryrefslogtreecommitdiffstats
path: root/components/translate
Commit message (Collapse)AuthorAgeFilesLines
* GN build improvements.brettw@chromium.org2014-04-301-0/+7
| | | | | | | | | | | | | | | | | Fixes a TODO about private symbols on GCC. Moves many third party BUILD.gn files from the secondary tree to the main one. Fixes the dependencies on Linux so "gn check" passes again. BUG=367595 R=scottmg@chromium.org Previous review: https://codereview.chromium.org/256153003/ Review URL: https://codereview.chromium.org/264463002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267233 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 266932 "GN build improvements."brettw@chromium.org2014-04-291-2/+0
| | | | | | | | | | | | | | | | | | | | | > GN build improvements. > > Fixes a TODO about private symbols on GCC. > > Moves many third party BUILD.gn files from the secondary tree to the main one. > > Fixes the dependencies on Linux so "gn check" passes again. > > BUG=367595 > R=scottmg@chromium.org > > Review URL: https://codereview.chromium.org/256153003 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/257243003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266933 0039d316-1c4b-4281-b951-d872f2087c98
* GN build improvements.brettw@chromium.org2014-04-291-0/+2
| | | | | | | | | | | | | | | Fixes a TODO about private symbols on GCC. Moves many third party BUILD.gn files from the secondary tree to the main one. Fixes the dependencies on Linux so "gn check" passes again. BUG=367595 R=scottmg@chromium.org Review URL: https://codereview.chromium.org/256153003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266932 0039d316-1c4b-4281-b951-d872f2087c98
* Enable builds of some translate libraries in GN world.tfarina@chromium.org2014-04-281-0/+1
| | | | | | | | | | | | | | | | | | | | | Debug: $ gn gen out/Debug_gn --args=is_debug=true $ ninja -C out/Debug_gn translate_core_browser translate_core_common Release: $ gn gen out/Release_gn --args=is_debug=false $ ninja -C out/Release_gn translate_core_browser translate_core_common BUG=None TEST=see above, it LINKS. R=brettw@chromium.org TBR=droger Review URL: https://codereview.chromium.org/250373002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266540 0039d316-1c4b-4281-b951-d872f2087c98
* Componentize TranslateUIDelegateblundell@chromium.org2014-04-102-0/+383
| | | | | | | | | | | | | | | | Changes TranslateUIDelegate to: - Take in a TranslateClient and TranslateManager rather than a WebContents. - Go through TranslateDriver and TranslateClient APIs rather than talking directly to TranslateTabHelper. Moves TranslateUIDelegate into the Translate component. BUG=335084 TBR=thakis Review URL: https://codereview.chromium.org/229363002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262961 0039d316-1c4b-4281-b951-d872f2087c98
* Fix compile-time bugs introduced by r261562.andrewhayden@chromium.org2014-04-091-0/+4
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/227703004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262785 0039d316-1c4b-4281-b951-d872f2087c98
* Componentize TranslateManagerblundell@chromium.org2014-04-093-0/+501
| | | | | | | | | | | | | | | | This CL does the following: - Abstracts the loading of the translation detection error report URL in a new tab to go through the client - Removes knowledge of TranslateTabHelper from TranslateManager - Componentizes TranslateManager BUG=335078,360020 TBR=thakis Review URL: https://codereview.chromium.org/224723025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262676 0039d316-1c4b-4281-b951-d872f2087c98
* Remove most content-level dependencies from TranslateManager.blundell@chromium.org2014-04-084-0/+76
| | | | | | | | | | | This CL introduces new TranslateDriver APIs to abstract calls to WebContents, NavigationController, and NavigationEntry. BUG=360027 Review URL: https://codereview.chromium.org/228483003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262528 0039d316-1c4b-4281-b951-d872f2087c98
* Move TranslateManager::IsTranslatableURL to be a client-level concept.blundell@chromium.org2014-04-081-0/+4
| | | | | | | | | | | | | | | | | The concept of whether a given URL is translatable is an embedder-level one. This CL does the following: - Moves TranslateManager::IsTranslatableURL to TranslateService and updates //chrome callers to call the latter. - Adds TranslateClient::IsTranslatableURL and has TranslateManager call that. - Moves TranslateManager unittest (only testing IsTranslatableURL) to be a unittest on TranslateService. BUG=360017 TBR=jochen Review URL: https://codereview.chromium.org/225263017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262427 0039d316-1c4b-4281-b951-d872f2087c98
* Move translate's BUILD.gn file into its final location.tfarina@chromium.org2014-04-081-0/+61
| | | | | | | | | | | | | | tools/gn/secondary is just a mirror of the real source tree and as of now we can put BUILD.gn near their code. BUG=None TEST=None, no functional changes. R=brettw@chromium.org TBR=hajimehoshi@chromium.org Review URL: https://codereview.chromium.org/225263012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262349 0039d316-1c4b-4281-b951-d872f2087c98
* Abstract TranslateTabHelper::ShowTranslateUI through TranslateClientblundell@chromium.org2014-04-071-0/+12
| | | | | | | | | | Straightforward abstraction of the method in question. BUG=360002 Review URL: https://codereview.chromium.org/224963011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262243 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate calls to BrowserContext::IsOffTheRecord in TranslateManagerblundell@chromium.org2014-04-074-0/+11
| | | | | | | | | | These calls are now abstracted through TranslateDriver. BUG=360008 Review URL: https://codereview.chromium.org/226043010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262235 0039d316-1c4b-4281-b951-d872f2087c98
* Abstract TranslateManager IPC sends through TranslateDriver.blundell@chromium.org2014-04-074-0/+53
| | | | | | | | | | | | Adds APIs to TranslateDriver for TranslateManager to call instead of directly sending IPC. ContentTranslateDriver implements these APIs via the IPC sends that were previously in TranslateManager. BUG=360008 Review URL: https://codereview.chromium.org/225423006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262135 0039d316-1c4b-4281-b951-d872f2087c98
* Move TranslateStep enum into the Translate component core code.blundell@chromium.org2014-04-071-0/+22
| | | | | | | | | | | | | | | This enum will be needed by the core Translate code. This CL moves it out of TranslateTabHelper (which will stay in //chrome) into a standalone translate_step.h file within the Translate component core code. It also renames the enum values to be prefixed by TRANSLATE_STEP_ in accordance with naming conventions for standalone enums (i.e., enums not defined within a class). BUG=360002 TBR=jochen Review URL: https://codereview.chromium.org/227043002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262109 0039d316-1c4b-4281-b951-d872f2087c98
* Move Translate renderer messages to the Translate componentdroger@chromium.org2014-04-042-0/+114
| | | | | | | | | BUG=335082 TBR=thakis Review URL: https://codereview.chromium.org/219963007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261683 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 256612 "On mobile. Do not check for ICU translations when..."miguelg@chromium.org2014-03-311-10/+2
| | | | | | | | | | | | | | | BUG=358115 > On mobile. Do not check for ICU translations when receiving new translate languages. > > > Review URL: https://codereview.chromium.org/194963005 TBR=miguelg@chromium.org Review URL: https://codereview.chromium.org/214623006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260513 0039d316-1c4b-4281-b951-d872f2087c98
* Remove dependency of TranslateManager on Profiledroger@chromium.org2014-03-211-0/+14
| | | | | | | | | | | In order to move TranslateManager into the Translate component, all dependencies on chrome/ have to be removed. BUG=335078 Review URL: https://codereview.chromium.org/174163012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258701 0039d316-1c4b-4281-b951-d872f2087c98
* Make droger an owner of Translatedroger@chromium.org2014-03-201-0/+1
| | | | | | | | | BUG=NONE R=blundell@chromium.org, mad@chromium.org Review URL: https://codereview.chromium.org/206513003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258351 0039d316-1c4b-4281-b951-d872f2087c98
* Fix "unreachable code" warnings (MSVC warning 4702), misc. edition.pkasting@chromium.org2014-03-181-12/+15
| | | | | | | | | | | | This CL covers top-level directories that only had one or two modified files. BUG=346399 TEST=none R=darin@chromium.org Review URL: https://codereview.chromium.org/203043002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257705 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce the TranslateClient interfacedroger@chromium.org2014-03-185-6/+41
| | | | | | | | | | | | | | | In order to move TranslateManager into the Translate component, all dependencies on chrome/ have to be removed. This CL introduces the TranslateClient interface which abstracts TranslateTabHelper. Eventually all uses of TranslateTabHelper in TranslateManaher will be replaced by TranslateClient and TranslateDriver. BUG=335078 Review URL: https://codereview.chromium.org/167823003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257644 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Revert of Use TOP #1 language from CLD2 instead of the summary ↵scheib@chromium.org2014-03-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | language (https://codereview.chromium.org/200453005/) Reason for revert: I previously reverted the wrong change. Original issue's description: > Revert of Use TOP #1 language from CLD2 instead of the summary language (https://codereview.chromium.org/75483009/) > > Reason for revert: > check licenses script failed and turned tree red: > > http://build.chromium.org/p/chromium/builders/Linux/builds/48235/steps/check_licenses/logs/stdio > > python src/tools/checklicenses/checklicenses.py --root src > in dir /b/build/slave/Linux/build (timeout 600 secs) (maxTime 28800 secs) > watching logfiles {} > argv: ['python', 'src/tools/checklicenses/checklicenses.py', '--root', 'src'] > environment: > AWS_CREDENTIAL_FILE=/b/build/site_config/.boto > BOTO_CONFIG=/b/build/site_config/.boto > CHROME_HEADLESS=1 > DISPLAY=:0.0 > HOME=/home/chrome-bot > LANG=en_US.UTF-8 > LOGNAME=chrome-bot > PAGER=cat > PATH=/home/chrome-bot/slavebin:/b/depot_tools:/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin > PWD=/b/build/slave/Linux/build > PYTHONPATH=/b/build/site_config:/b/build/scripts:/b/build/scripts/release:/b/build/third_party:/b/build_internal/site_config:/b/build_internal/symsrc:/b/build/slave:/b/build/third_party/buildbot_slave_8_4:/b/build/third_party/twisted_10_2: > SHELL=/bin/bash > USER=chrome-bot > using PTY: False > Using base directory: src > Checking: src > > 'third_party/cld_2/src/internal/cld2_generated_deltaoctachrome0122.cc' has non-whitelisted license 'UNKNOWN' > 'third_party/cld_2/src/internal/cld2_generated_quadchrome0122_19.cc' has non-whitelisted license 'UNKNOWN' > 'third_party/cld_2/src/internal/cld2_generated_quadchrome0122_16.cc' has non-whitelisted license 'UNKNOWN' > 'third_party/cld_2/src/internal/cld2_generated_quadchrome0122_2.cc' has non-whitelisted license 'UNKNOWN' > 'third_party/cld_2/src/internal/cld2_generated_distinctoctachrome0122.cc' has non-whitelisted license 'UNKNOWN' > 'third_party/cld_2/src/internal/cld2_generated_deltaocta0122.cc' has non-whitelisted license 'UNKNOWN' > 'third_party/cld_2/src/internal/cld2_generated_distinctocta0122.cc' has non-whitelisted license 'UNKNOWN' > > FAILED > > Please read http://www.chromium.org/developers/adding-3rd-party-libraries > for more info how to handle the failure. > > > Original issue's description: > > Use TOP #1 language from CLD2 instead of the summary language > > > > The summary language and the top language are different, and the top language should be used for Translate. Originally, Chromium adopts the top language of CLD1, and summary language of CLD2. This CL fixes to use the top language even in the case of CLD2. > > > > BUG=320362 > > TEST=manual > > > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=236228 > > TBR=toyoshim@chromium.org,hajimehoshi@chromium.org > NOTREECHECKS=true > NOTRY=true > BUG=320362 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257142 TBR=toyoshim@chromium.org,hajimehoshi@chromium.org NOTREECHECKS=true NOTRY=true BUG=320362 Review URL: https://codereview.chromium.org/195983022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257149 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Use TOP #1 language from CLD2 instead of the summary language ↵scheib@chromium.org2014-03-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/75483009/) Reason for revert: check licenses script failed and turned tree red: http://build.chromium.org/p/chromium/builders/Linux/builds/48235/steps/check_licenses/logs/stdio python src/tools/checklicenses/checklicenses.py --root src in dir /b/build/slave/Linux/build (timeout 600 secs) (maxTime 28800 secs) watching logfiles {} argv: ['python', 'src/tools/checklicenses/checklicenses.py', '--root', 'src'] environment: AWS_CREDENTIAL_FILE=/b/build/site_config/.boto BOTO_CONFIG=/b/build/site_config/.boto CHROME_HEADLESS=1 DISPLAY=:0.0 HOME=/home/chrome-bot LANG=en_US.UTF-8 LOGNAME=chrome-bot PAGER=cat PATH=/home/chrome-bot/slavebin:/b/depot_tools:/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin PWD=/b/build/slave/Linux/build PYTHONPATH=/b/build/site_config:/b/build/scripts:/b/build/scripts/release:/b/build/third_party:/b/build_internal/site_config:/b/build_internal/symsrc:/b/build/slave:/b/build/third_party/buildbot_slave_8_4:/b/build/third_party/twisted_10_2: SHELL=/bin/bash USER=chrome-bot using PTY: False Using base directory: src Checking: src 'third_party/cld_2/src/internal/cld2_generated_deltaoctachrome0122.cc' has non-whitelisted license 'UNKNOWN' 'third_party/cld_2/src/internal/cld2_generated_quadchrome0122_19.cc' has non-whitelisted license 'UNKNOWN' 'third_party/cld_2/src/internal/cld2_generated_quadchrome0122_16.cc' has non-whitelisted license 'UNKNOWN' 'third_party/cld_2/src/internal/cld2_generated_quadchrome0122_2.cc' has non-whitelisted license 'UNKNOWN' 'third_party/cld_2/src/internal/cld2_generated_distinctoctachrome0122.cc' has non-whitelisted license 'UNKNOWN' 'third_party/cld_2/src/internal/cld2_generated_deltaocta0122.cc' has non-whitelisted license 'UNKNOWN' 'third_party/cld_2/src/internal/cld2_generated_distinctocta0122.cc' has non-whitelisted license 'UNKNOWN' FAILED Please read http://www.chromium.org/developers/adding-3rd-party-libraries for more info how to handle the failure. Original issue's description: > Use TOP #1 language from CLD2 instead of the summary language > > The summary language and the top language are different, and the top language should be used for Translate. Originally, Chromium adopts the top language of CLD1, and summary language of CLD2. This CL fixes to use the top language even in the case of CLD2. > > BUG=320362 > TEST=manual > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=236228 TBR=toyoshim@chromium.org,hajimehoshi@chromium.org NOTREECHECKS=true NOTRY=true BUG=320362 Review URL: https://codereview.chromium.org/200453005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257142 0039d316-1c4b-4281-b951-d872f2087c98
* On mobile. Do not check for ICU translations when receiving new translate ↵miguelg@chromium.org2014-03-121-2/+10
| | | | | | | | | | languages. BUG=350932 Review URL: https://codereview.chromium.org/194963005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256612 0039d316-1c4b-4281-b951-d872f2087c98
* Consider the origin flag when loading the translate language listmiguelg@chromium.org2014-03-123-4/+15
| | | | | | | | BUG=350932 Review URL: https://codereview.chromium.org/195553002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256561 0039d316-1c4b-4281-b951-d872f2087c98
* Move TranslateManager unit tests out of the browser_tests target.danakj@chromium.org2014-03-072-0/+8
| | | | | | | | | | | | | These are unit tests so they should be in the unit_tests target. A TODO says this did not work before, but they appear to pass as unit tests now, so this is just a code move. BUG=270918 R=droger@chromium.org, hajimehoshi@chromium.org Review URL: https://codereview.chromium.org/186063007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255661 0039d316-1c4b-4281-b951-d872f2087c98
* Move TrimWhitespace to the base namespace.brettw@chromium.org2014-03-031-1/+1
| | | | | | | | R=viettrungluu@chromium.org, viettrungluu Review URL: https://codereview.chromium.org/183853011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254521 0039d316-1c4b-4281-b951-d872f2087c98
* Move the translate script callbacks from TranslateManager to TranslateScriptdroger@chromium.org2014-02-172-13/+19
| | | | | | | | | | | | | | | | | This CL refactors the way callbacks for TranslateScript are handled. Previously, only one callback was allowed, and thus TranslateManager was managing a global list of pending script request to be able to merge all these requests into one callback. As we want to move away from TranslateManager being a singleton, the management of TranslateScript requests is moved to TranslateScript (which is also cleaner). TranslateScript now supports multiple callbacks. BUG=332736 Review URL: https://codereview.chromium.org/166553003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251666 0039d316-1c4b-4281-b951-d872f2087c98
* Move TranslatePrefs to the Translate componentdroger@chromium.org2014-02-146-5/+817
| | | | | | | | | | | | | | | TranslatePrefs now needs the path to preferences in its constructor. To help with this, a helper method is added to TranslateTabHelper to build TranslatePrefs instances. As a result, TranslatePrefs are no longer instantiated on the stack, but rather on the heap. BUG=335079 TBR=battre, jochen, joi Review URL: https://codereview.chromium.org/159883002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251305 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor TranslateAcceptLanguages as a BrowserContextKeyedServicedroger@chromium.org2014-02-112-0/+134
| | | | | | | | | | | | | | | | | | | This CL refactors TranslateAcceptLanguages as a BrowserContextKeyedService, and moves it into the Translate component. The choice of BrowserContextKeyedService seems obvious since there is one accept languages list per profile. The existing code is simplified, since the handling of profiles and notifications is deferred to the BrowserContextKeyedService code and can be removed. Note that there is now one TranslateAcceptLanguages instance per profile (it was a singleton owned by TranslateManager previously). BUG=335076 Review URL: https://codereview.chromium.org/149753006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250480 0039d316-1c4b-4281-b951-d872f2087c98
* Move the translate script to the Translate componentdroger@chromium.org2014-02-079-3/+718
| | | | | | | | | | | | This CL moves the TranslateScript class and the translate.js script. A new translate_resources target is created. BUG=335074 TBR=jochen Review URL: https://codereview.chromium.org/138933006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249620 0039d316-1c4b-4281-b951-d872f2087c98
* Translate: Bug fix: remove a region code of a language code when ↵hajimehoshi@chromium.org2014-02-064-16/+18
| | | | | | | | | | | | | | | | initializing the bubble Called TranslateManager::GetLanguage at GetTranslateLanguages of translate_bubble_view.cc. Apparently, TranslateManager::GetLanguage is used not only for the chrome locale but also for any language codes, so I renamed the argument name. BUG=336732 TEST=manual Review URL: https://codereview.chromium.org/141763005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249356 0039d316-1c4b-4281-b951-d872f2087c98
* Move TranslateLanguageList to the Translate componentdroger@chromium.org2014-02-0511-3/+669
| | | | | | | | | | | | | | | | | | | | | | | | | | A lot of static methods from TranslateManager are moved to TranslateDownloadManager, as they are related to the management of the TranslateLanguageList. The observer interface for translate events has been moved from TranslateManager to TranslateLanguageList. It also has been changed into a callback list rather than an observer list, since observers with a single method are generally discouraged. The SetSupportedLanguages() method in TranslateLanguageList has been moved from the anonymous namespace as it needs to invoke the callbacks for translate events. Finally, this CL fixes a bug where the TranslateList was not listening to ResourceRequestNotifications. BUG=335077, 335085, 339508 R=blundell@chromium.org, jochen@chromium.org, joi@chromium.org, mad@chromium.org TBR=jochen, joi, sky Review URL: https://codereview.chromium.org/143003020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248975 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce TranslateService and TranslateDownloadManagerdroger@chromium.org2014-01-295-35/+76
| | | | | | | | | | | | | | | This CL removes the TranslateDelegate interface and introduces TranslateService and TranslateDownloadManager. This will enable (in a future CL) to move TranslateScript and TranslateLanguageList in the Translate component, and TranslateDownloadManager will own them. BUG=332736 Review URL: https://codereview.chromium.org/145023015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247724 0039d316-1c4b-4281-b951-d872f2087c98
* Move LanguageState to the translate componentdroger@chromium.org2014-01-218-0/+494
| | | | | | | | | | | | | This CL introduces the TranslateDriver and a content implementation of it (ContentTranslateDriver), and moves LanguageState to the translate component. LanguageState gets information from the content driver through the TranslateDriver API. BUG=335092 Review URL: https://codereview.chromium.org/133273029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246023 0039d316-1c4b-4281-b951-d872f2087c98
* Move TranslateURLFetcher to the translate componentdroger@chromium.org2014-01-104-0/+195
| | | | | | | | | | | | | This CL introduces the TranslateDelegate to inject the required dependencies in the translate component. TranslateDelegate is a singleton for now, but this will need to be revisited once the ownership model of TranslateManager is improved. BUG=331509 Review URL: https://codereview.chromium.org/131463002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@244199 0039d316-1c4b-4281-b951-d872f2087c98
* Move LanguageUsageMetrics and TranslateBrowserMetrics to componentsdroger@chromium.org2014-01-094-1/+350
| | | | | | | | | | | | | | LanguageUsageMetrics is moved to its own component because it is used both in the translate component and directly in the browser. TranslateBrowserMetrics is moved to the translate component. BUG=331509 TBR=jochen Review URL: https://codereview.chromium.org/131203002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243946 0039d316-1c4b-4281-b951-d872f2087c98
* Move Translate-related files to components/translatedroger@chromium.org2014-01-0721-51/+241
| | | | | | | | | | | | This CL moves a few files to the translate component. It also layers the structure of the component so that it is better suited for iOS. BUG=331509 TBR=jochen, joi Review URL: https://codereview.chromium.org/93603006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243319 0039d316-1c4b-4281-b951-d872f2087c98
* Update uses of UTF conversions in chrome_frame/, chromeos/, components/ to ↵avi@chromium.org2013-12-252-5/+5
| | | | | | | | | | | | use the base:: namespace. BUG=330556 TEST=no change TBR=ben@chromium.org Review URL: https://codereview.chromium.org/112433004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242493 0039d316-1c4b-4281-b951-d872f2087c98
* Use TOP #1 language from CLD2 instead of the summary languagehajimehoshi@chromium.org2013-11-201-1/+2
| | | | | | | | | | | The summary language and the top language are different, and the top language should be used for Translate. Originally, Chromium adopts the top language of CLD1, and summary language of CLD2. This CL fixes to use the top language even in the case of CLD2. BUG=320362 TEST=manual Review URL: https://codereview.chromium.org/75483009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236228 0039d316-1c4b-4281-b951-d872f2087c98
* [Translate] Apply language synonyms to the target languagemiguelg@chromium.org2013-11-131-1/+1
| | | | | | | | | | | | | | Expose ConvertLangCodeForTranslation and use it when converting the UX language for all platforms (the performance hit should be negligible and this way it is more legible than adding a #ifdef Android) Fix a few unrelated typos on comments while at it. BUG=311624 Review URL: https://codereview.chromium.org/68823004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234706 0039d316-1c4b-4281-b951-d872f2087c98
* Collect UMAs (Modify*Lang) into TranslateUIDelegatehajimehoshi@chromium.org2013-10-312-10/+1
| | | | | | | | | | | Renamed TranslateUIDelegate::Set*LanguageIndex to Update*LanguageIndex and have them include UMA callings. BUG=312720 TEST=unit_tests --gtest_filter=TranslateBubbleViewTest.* Review URL: https://codereview.chromium.org/52213002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232057 0039d316-1c4b-4281-b951-d872f2087c98
* [Translate]Add Uma stats for language changes in linux and androidmiguelg@chromium.org2013-10-292-1/+10
| | | | | | | | BUG=311245 Review URL: https://codereview.chromium.org/48673002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231582 0039d316-1c4b-4281-b951-d872f2087c98
* Hardcode CLD version strings to avoid linking CLD to the browserdroger@chromium.org2013-10-142-19/+0
| | | | | | | | | BUG=297777 TBR=jochen Review URL: https://codereview.chromium.org/25654004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228478 0039d316-1c4b-4281-b951-d872f2087c98
* Move language detection to a componentdroger@chromium.org2013-10-0417-0/+1466
Language detection is used from the renderer on most platform, but from the browser on iOS. This CL moves it from chrome/common/ to a new "translate" component, which allows to track and address more cleanly dependencies issues. BUG=297777 Review URL: https://codereview.chromium.org/25531002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227015 0039d316-1c4b-4281-b951-d872f2087c98