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

Issue 143003020: Move TranslateLanguageList to the Translate component (Closed)

Created:
6 years, 11 months ago by droger
Modified:
6 years, 10 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, Avi (use Gerrit), creis+watch_chromium.org, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, nona+watch_chromium.org, ajwong+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@removeDelegate
Visibility:
Public.

Description

Move TranslateLanguageList to the Translate component 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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=248975

Patch Set 1 : . #

Patch Set 2 : fix for 339508 #

Patch Set 3 : Minor cleanup #

Total comments: 13

Patch Set 4 : Review comments #

Patch Set 5 : gn build #

Total comments: 6

Patch Set 6 : Review comments #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+476 lines, -786 lines) Patch
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 4 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/preference/preference_api.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/preference/preference_apitest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler_list_factory.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 1 2 3 4 5 6 5 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/translate/translate_infobar_delegate.cc View 2 chunks +3 lines, -2 lines 0 comments Download
D chrome/browser/translate/translate_language_list.h View 1 chunk +0 lines, -89 lines 0 comments Download
D chrome/browser/translate/translate_language_list.cc View 1 chunk +0 lines, -330 lines 0 comments Download
M chrome/browser/translate/translate_manager.h View 1 2 3 4 5 6 6 chunks +0 lines, -35 lines 0 comments Download
M chrome/browser/translate/translate_manager.cc View 1 2 3 4 5 6 15 chunks +24 lines, -84 lines 0 comments Download
M chrome/browser/translate/translate_manager_browsertest.cc View 1 2 3 4 5 6 8 chunks +13 lines, -12 lines 0 comments Download
M chrome/browser/translate/translate_prefs.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/translate/translate_script.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/translate/translate_service.h View 1 1 chunk +13 lines, -2 lines 0 comments Download
M chrome/browser/translate/translate_service.cc View 1 2 3 4 5 2 chunks +37 lines, -2 lines 0 comments Download
M chrome/browser/translate/translate_ui_delegate.cc View 2 chunks +2 lines, -1 line 0 comments Download
D chrome/browser/translate/translate_url_util.h View 1 chunk +0 lines, -22 lines 0 comments Download
D chrome/browser/translate/translate_url_util.cc View 1 chunk +0 lines, -37 lines 0 comments Download
M chrome/browser/ui/browser_ui_prefs.cc View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/translate_infobar_unittest.mm View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/options/language_options_handler_common.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/translate_internals/translate_internals_handler.h View 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/translate_internals/translate_internals_handler.cc View 1 2 3 3 chunks +17 lines, -3 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 6 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 1 chunk +0 lines, -3 lines 0 comments Download
M components/translate.gypi View 3 chunks +8 lines, -0 lines 0 comments Download
M components/translate/DEPS View 1 chunk +2 lines, -0 lines 0 comments Download
M components/translate/core/browser/translate_download_manager.h View 1 2 3 4 5 2 chunks +40 lines, -2 lines 0 comments Download
M components/translate/core/browser/translate_download_manager.cc View 1 2 3 4 5 1 chunk +93 lines, -1 line 0 comments Download
A + components/translate/core/browser/translate_language_list.h View 1 2 3 4 chunks +36 lines, -14 lines 0 comments Download
A + components/translate/core/browser/translate_language_list.cc View 1 2 3 4 5 8 chunks +118 lines, -115 lines 0 comments Download
A + components/translate/core/browser/translate_url_util.h View 2 chunks +3 lines, -3 lines 0 comments Download
A + components/translate/core/browser/translate_url_util.cc View 2 chunks +2 lines, -3 lines 0 comments Download
A components/translate/core/common/translate_pref_names.h View 1 chunk +14 lines, -0 lines 0 comments Download
A components/translate/core/common/translate_pref_names.cc View 1 chunk +12 lines, -0 lines 0 comments Download
M components/translate/core/common/translate_switches.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/translate/core/common/translate_switches.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M tools/gn/secondary/components/translate/BUILD.gn View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 40 (0 generated)
droger
FYI, do not review yet. This is the CL where start moving files under the ...
6 years, 11 months ago (2014-01-24 17:50:19 UTC) #1
droger_google
6 years, 10 months ago (2014-01-30 15:50:16 UTC) #2
droger
+mad I added a fix for http://crbug.com/339508. https://codereview.chromium.org/143003020/diff/210002/components/translate/core/browser/translate_language_list.cc File components/translate/core/browser/translate_language_list.cc (left): https://codereview.chromium.org/143003020/diff/210002/components/translate/core/browser/translate_language_list.cc#oldcode123 components/translate/core/browser/translate_language_list.cc:123: void SetSupportedLanguages(const ...
6 years, 10 months ago (2014-01-30 17:28:27 UTC) #3
blundell
LGTM https://codereview.chromium.org/143003020/diff/210002/chrome/browser/translate/translate_service.cc File chrome/browser/translate/translate_service.cc (right): https://codereview.chromium.org/143003020/diff/210002/chrome/browser/translate/translate_service.cc#newcode29 chrome/browser/translate/translate_service.cc:29: // Create the TranslateManager singleton. nit: blank line ...
6 years, 10 months ago (2014-01-31 10:49:45 UTC) #4
droger
https://codereview.chromium.org/143003020/diff/210002/chrome/browser/translate/translate_service.cc File chrome/browser/translate/translate_service.cc (right): https://codereview.chromium.org/143003020/diff/210002/chrome/browser/translate/translate_service.cc#newcode29 chrome/browser/translate/translate_service.cc:29: // Create the TranslateManager singleton. On 2014/01/31 10:49:45, blundell ...
6 years, 10 months ago (2014-01-31 13:40:49 UTC) #5
droger
mad: ping
6 years, 10 months ago (2014-02-03 09:20:46 UTC) #6
MAD
Sorry about the delay... I have a few comments... Thanks by the way... very clean ...
6 years, 10 months ago (2014-02-03 14:02:43 UTC) #7
droger
Thanks for the review, especially for catching the |request_pending_| bug. I applied all your comments. ...
6 years, 10 months ago (2014-02-03 15:07:20 UTC) #8
MAD
Thanks! LGTM... BYE MAD
6 years, 10 months ago (2014-02-03 18:58:51 UTC) #9
droger
The CQ bit was checked by droger@chromium.org
6 years, 10 months ago (2014-02-03 19:40:19 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/droger@chromium.org/143003020/600001
6 years, 10 months ago (2014-02-03 19:42:02 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-03 20:04:27 UTC) #12
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=47713
6 years, 10 months ago (2014-02-03 20:04:27 UTC) #13
commit-bot: I haz the power
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-03 20:04:28 UTC) #14
commit-bot: I haz the power
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-03 20:04:38 UTC) #15
droger
TBR jochen (only renaming methods and includes) for: chrome/browser/chrome_browser_main.cc chrome/browser/extensions/ chrome/browser/policy/ chrome/browser/sync/ chrome/browser/tab/ chrome/browser/ui/ TBR ...
6 years, 10 months ago (2014-02-04 11:08:31 UTC) #16
droger
The CQ bit was checked by droger@chromium.org
6 years, 10 months ago (2014-02-04 11:09:28 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/droger@chromium.org/143003020/600001
6 years, 10 months ago (2014-02-04 11:10:47 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-04 11:30:22 UTC) #19
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=47891
6 years, 10 months ago (2014-02-04 11:30:23 UTC) #20
droger
The CQ bit was checked by droger@chromium.org
6 years, 10 months ago (2014-02-04 11:57:47 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/droger@chromium.org/143003020/600001
6 years, 10 months ago (2014-02-04 11:57:59 UTC) #22
jochen (gone - plz use gerrit)
lgtm
6 years, 10 months ago (2014-02-04 12:17:44 UTC) #23
Jói
translate dep on google_apis LGTM On Tue, Feb 4, 2014 at 12:17 PM, <jochen@chromium.org> wrote: ...
6 years, 10 months ago (2014-02-04 13:55:47 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-04 14:02:50 UTC) #25
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) base_unittests, browser_tests, interactive_ui_tests, net_unittests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=223140
6 years, 10 months ago (2014-02-04 14:02:51 UTC) #26
skia-commit-bot
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-04 14:03:00 UTC) #27
droger
The CQ bit was checked by droger@chromium.org
6 years, 10 months ago (2014-02-04 14:26:35 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/droger@chromium.org/143003020/600001
6 years, 10 months ago (2014-02-04 14:27:18 UTC) #29
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-04 15:56:04 UTC) #30
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) base_unittests, browser_tests, interactive_ui_tests, net_unittests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=223221
6 years, 10 months ago (2014-02-04 15:56:05 UTC) #31
skia-commit-bot
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-04 15:56:05 UTC) #32
droger
The CQ bit was checked by droger@chromium.org
6 years, 10 months ago (2014-02-04 21:19:08 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/droger@chromium.org/143003020/600001
6 years, 10 months ago (2014-02-04 22:27:56 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/droger@chromium.org/143003020/600001
6 years, 10 months ago (2014-02-05 01:03:10 UTC) #35
droger
The CQ bit was unchecked by droger@chromium.org
6 years, 10 months ago (2014-02-05 10:05:41 UTC) #36
droger
The CQ bit was checked by droger@chromium.org
6 years, 10 months ago (2014-02-05 10:05:44 UTC) #37
droger
The CQ bit was unchecked by droger@chromium.org
6 years, 10 months ago (2014-02-05 10:50:40 UTC) #38
droger
The CQ bit was checked by droger@chromium.org
6 years, 10 months ago (2014-02-05 10:51:00 UTC) #39
droger
6 years, 10 months ago (2014-02-05 13:14:32 UTC) #40
Message was sent while issue was closed.
Committed patchset #7 manually as r248975 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698