Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1532)

Issue 25531002: Move language detection to a component (Closed)

Created:
7 years, 2 months ago by droger
Modified:
7 years, 2 months ago
CC:
chromium-reviews, arv+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Move language detection to a component 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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=227015

Patch Set 1 #

Patch Set 2 : Minor changes #

Patch Set 3 : formatting #

Patch Set 4 : Fix compilation #

Total comments: 16

Patch Set 5 : Revert unrelated changes #

Patch Set 6 : switches namespace #

Patch Set 7 : rebase #

Total comments: 2

Patch Set 8 : Add a README #

Total comments: 3

Patch Set 9 : Review comments #

Patch Set 10 : Minor changes #

Total comments: 8

Patch Set 11 : Review comments #

Patch Set 12 : Rebase #

Patch Set 13 : Fix rebase #

Patch Set 14 : Rebase again #

Patch Set 15 : Rebase again #

Patch Set 16 : Run translate unittests on iOS #

Unified diffs Side-by-side diffs Delta from patch set Stats (+383 lines, -1801 lines) Patch
M build/all.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/DEPS View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/resources/translate.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/translate/translate_accept_languages.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/translate/translate_browsertest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/translate/translate_infobar_delegate.h View 12 13 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/translate/translate_infobar_delegate.cc View 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/translate/translate_manager.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/translate/translate_prefs.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/translate/translate_script.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/startup/bad_flags_prompt.cc View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/translate_internals/translate_internals_ui.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 2 chunks +0 lines, -16 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/common/DEPS View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/common/chrome_constants.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/common/chrome_constants.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -3 lines 0 comments Download
D chrome/common/translate/language_detection_util.h View 1 chunk +0 lines, -47 lines 0 comments Download
D chrome/common/translate/language_detection_util.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -403 lines 0 comments Download
D chrome/common/translate/language_detection_util_unittest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -169 lines 0 comments Download
D chrome/common/translate/translate_common_metrics.h View 1 chunk +0 lines, -104 lines 0 comments Download
D chrome/common/translate/translate_common_metrics.cc View 1 chunk +0 lines, -142 lines 0 comments Download
D chrome/common/translate/translate_common_metrics_unittest.cc View 1 chunk +0 lines, -300 lines 0 comments Download
D chrome/common/translate/translate_util.h View 1 chunk +0 lines, -28 lines 0 comments Download
D chrome/common/translate/translate_util.cc View 1 2 3 4 5 6 1 chunk +0 lines, -125 lines 0 comments Download
D chrome/common/translate/translate_util_unittest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -96 lines 0 comments Download
M chrome/renderer/DEPS View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/translate/translate_helper.cc View 1 2 3 6 chunks +13 lines, -13 lines 0 comments Download
M chrome/renderer/translate/translate_helper_browsertest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M components/OWNERS View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M components/components.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/components_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +8 lines, -0 lines 0 comments Download
A + components/translate.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +25 lines, -32 lines 0 comments Download
A + components/translate/DEPS View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
A + components/translate/OWNERS View 1 2 3 4 5 6 7 8 9 10 0 chunks +-1 lines, --1 lines 0 comments Download
A components/translate/README View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -0 lines 0 comments Download
A components/translate/common/translate_constants.h View 1 chunk +16 lines, -0 lines 0 comments Download
A + components/translate/common/translate_constants.cc View 1 2 3 4 5 7 8 9 10 11 1 chunk +4 lines, -4 lines 0 comments Download
A + components/translate/common/translate_metrics.h View 2 chunks +5 lines, -5 lines 0 comments Download
A + components/translate/common/translate_metrics.cc View 1 2 3 4 5 6 7 8 3 chunks +24 lines, -36 lines 0 comments Download
A + components/translate/common/translate_metrics_unittest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +91 lines, -107 lines 0 comments Download
A + components/translate/common/translate_switches.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -6 lines 0 comments Download
A + components/translate/common/translate_switches.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -6 lines 0 comments Download
A + components/translate/common/translate_util.h View 2 chunks +5 lines, -5 lines 0 comments Download
A + components/translate/common/translate_util.cc View 1 2 3 4 5 6 3 chunks +4 lines, -4 lines 0 comments Download
A + components/translate/common/translate_util_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +20 lines, -20 lines 0 comments Download
A components/translate/language_detection/DEPS View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
A + components/translate/language_detection/language_detection_util.h View 2 chunks +5 lines, -5 lines 0 comments Download
A + components/translate/language_detection/language_detection_util.cc View 1 2 3 4 5 6 7 8 9 10 13 chunks +35 lines, -37 lines 0 comments Download
A + components/translate/language_detection/language_detection_util_unittest.cc View 1 2 3 4 5 6 7 chunks +49 lines, -45 lines 0 comments Download
M third_party/cld/cld.gyp View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 16 (0 generated)
droger
blundell: Could you do an overall pass on the CL and issues around componentization.
7 years, 2 months ago (2013-10-01 17:08:26 UTC) #1
blundell
Please add a README to components/translate that is similar to the README in components/webdata and ...
7 years, 2 months ago (2013-10-02 10:01:15 UTC) #2
blundell
Please add a README to components/translate that is similar to the README in components/webdata and ...
7 years, 2 months ago (2013-10-02 10:01:17 UTC) #3
droger
Thanks for the review. https://codereview.chromium.org/25531002/diff/46001/build/all.gyp File build/all.gyp (right): https://codereview.chromium.org/25531002/diff/46001/build/all.gyp#newcode15 build/all.gyp:15: '../components/components.gyp:*', On 2013/10/02 10:01:17, blundell ...
7 years, 2 months ago (2013-10-02 10:59:41 UTC) #4
blundell
Looks good with the exception of the question re: ChromeLanguageSynonym that hopefully the translate owners ...
7 years, 2 months ago (2013-10-02 11:02:21 UTC) #5
droger
+joi for components +hajimehoshi for translate https://codereview.chromium.org/25531002/diff/24001/chrome/browser/translate/translate_browsertest.cc File chrome/browser/translate/translate_browsertest.cc (right): https://codereview.chromium.org/25531002/diff/24001/chrome/browser/translate/translate_browsertest.cc#newcode59 chrome/browser/translate/translate_browsertest.cc:59: command_line->AppendSwitchASCII(translate::switches::kTranslateSecurityOrigin, On 2013/10/02 ...
7 years, 2 months ago (2013-10-02 11:09:11 UTC) #6
droger
+joi for components +hajimehoshi for translate
7 years, 2 months ago (2013-10-02 11:09:33 UTC) #7
Jói
https://codereview.chromium.org/25531002/diff/76001/components/components.gyp File components/components.gyp (right): https://codereview.chromium.org/25531002/diff/76001/components/components.gyp#newcode24 components/components.gyp:24: 'translate.gypi', Please add //components/translate/OWNERS and you can add the ...
7 years, 2 months ago (2013-10-02 12:12:10 UTC) #8
droger
Thanks for the comments. https://codereview.chromium.org/25531002/diff/76001/components/components.gyp File components/components.gyp (right): https://codereview.chromium.org/25531002/diff/76001/components/components.gyp#newcode24 components/components.gyp:24: 'translate.gypi', On 2013/10/02 12:12:11, Jói ...
7 years, 2 months ago (2013-10-02 12:33:11 UTC) #9
Jói
Thanks, //components LGTM.
7 years, 2 months ago (2013-10-02 12:38:30 UTC) #10
hajimehoshi
lgtm
7 years, 2 months ago (2013-10-03 05:13:18 UTC) #11
droger
+jochen as OWNER of chrome/browser and chrome/common
7 years, 2 months ago (2013-10-03 08:56:19 UTC) #12
droger
+jochen as OWNER of chrome/browser and chrome/common
7 years, 2 months ago (2013-10-03 08:56:30 UTC) #13
jochen (gone - plz use gerrit)
lgtm
7 years, 2 months ago (2013-10-04 08:16:37 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/droger@chromium.org/25531002/141001
7 years, 2 months ago (2013-10-04 08:39:09 UTC) #15
commit-bot: I haz the power
7 years, 2 months ago (2013-10-04 16:03:13 UTC) #16
Message was sent while issue was closed.
Change committed as 227015

Powered by Google App Engine
This is Rietveld 408576698