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

Issue 159883002: Move TranslatePrefs to the Translate component (Closed)

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

Description

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

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : comments #

Patch Set 4 : Fix typo #

Total comments: 5

Patch Set 5 : Review comments #

Total comments: 2

Patch Set 6 : Review comments #

Patch Set 7 : Fix ChromeOS compilation #

Patch Set 8 : Fix ChromeOS browsertests #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -1020 lines) Patch
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 7 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/migration_test.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc View 4 chunks +35 lines, -28 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/translate/translate_infobar_delegate.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/translate/translate_infobar_delegate.cc View 1 2 3 4 4 chunks +10 lines, -5 lines 0 comments Download
M chrome/browser/translate/translate_manager.cc View 1 2 3 4 4 chunks +13 lines, -6 lines 0 comments Download
M chrome/browser/translate/translate_manager_browsertest.cc View 1 2 3 4 13 chunks +48 lines, -38 lines 0 comments Download
D chrome/browser/translate/translate_prefs.h View 1 chunk +0 lines, -143 lines 0 comments Download
D chrome/browser/translate/translate_prefs.cc View 1 chunk +0 lines, -552 lines 0 comments Download
D chrome/browser/translate/translate_prefs_unittest.cc View 1 chunk +0 lines, -119 lines 0 comments Download
M chrome/browser/translate/translate_tab_helper.h View 1 2 3 4 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/translate/translate_tab_helper.cc View 1 2 3 4 5 4 chunks +23 lines, -1 line 0 comments Download
M chrome/browser/translate/translate_ui_delegate.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/translate_infobar_unittest.mm View 3 chunks +9 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/options/language_options_handler_common.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/translate_internals/translate_internals_handler.cc View 3 chunks +8 lines, -6 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M components/components_tests.gyp View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M components/translate.gypi View 2 chunks +3 lines, -0 lines 2 comments Download
M components/translate/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M components/translate/core/browser/translate_download_manager.h View 1 2 3 4 5 6 7 2 chunks +1 line, -5 lines 0 comments Download
M components/translate/core/browser/translate_download_manager.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
A + components/translate/core/browser/translate_prefs.h View 1 2 3 4 5 6 8 chunks +34 lines, -23 lines 0 comments Download
A + components/translate/core/browser/translate_prefs.cc View 1 2 3 4 5 19 chunks +52 lines, -64 lines 0 comments Download
A + components/translate/core/browser/translate_prefs_unittest.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M tools/gn/secondary/components/translate/BUILD.gn View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
droger
6 years, 10 months ago (2014-02-12 12:17:04 UTC) #1
blundell
LGTM https://codereview.chromium.org/159883002/diff/170001/chrome/browser/translate/translate_tab_helper.h File chrome/browser/translate/translate_tab_helper.h (right): https://codereview.chromium.org/159883002/diff/170001/chrome/browser/translate/translate_tab_helper.h#newcode43 chrome/browser/translate/translate_tab_helper.h:43: // accept language. |language| will be converted if ...
6 years, 10 months ago (2014-02-12 14:01:43 UTC) #2
droger
https://codereview.chromium.org/159883002/diff/170001/components/translate/core/browser/translate_prefs.cc File components/translate/core/browser/translate_prefs.cc (left): https://codereview.chromium.org/159883002/diff/170001/components/translate/core/browser/translate_prefs.cc#oldcode296 components/translate/core/browser/translate_prefs.cc:296: TranslateAcceptLanguages* accept_languages = On 2014/02/12 14:01:43, blundell wrote: > ...
6 years, 10 months ago (2014-02-12 14:08:22 UTC) #3
droger
Thanks for the review. I fixed/replied to all your comments. https://codereview.chromium.org/159883002/diff/170001/components/translate/core/browser/translate_prefs.cc File components/translate/core/browser/translate_prefs.cc (left): https://codereview.chromium.org/159883002/diff/170001/components/translate/core/browser/translate_prefs.cc#oldcode296 ...
6 years, 10 months ago (2014-02-12 14:38:46 UTC) #4
droger
+mad
6 years, 10 months ago (2014-02-12 15:09:13 UTC) #5
MAD
I have one comment... https://codereview.chromium.org/159883002/diff/300001/components/translate/core/browser/translate_prefs.h File components/translate/core/browser/translate_prefs.h (right): https://codereview.chromium.org/159883002/diff/300001/components/translate/core/browser/translate_prefs.h#newcode40 components/translate/core/browser/translate_prefs.h:40: #if defined(OS_CHROMEOS) I don't really ...
6 years, 10 months ago (2014-02-13 03:11:10 UTC) #6
droger
Thanks for the review. Please take a look. https://codereview.chromium.org/159883002/diff/300001/components/translate/core/browser/translate_prefs.h File components/translate/core/browser/translate_prefs.h (right): https://codereview.chromium.org/159883002/diff/300001/components/translate/core/browser/translate_prefs.h#newcode40 components/translate/core/browser/translate_prefs.h:40: #if ...
6 years, 10 months ago (2014-02-13 09:38:38 UTC) #7
MAD
Cool... Thanks! LGTM BYE MAD
6 years, 10 months ago (2014-02-13 14:42:34 UTC) #8
droger
TBR=battre for the new dependency of components/translate on components/user_prefs TBR=joi as OWNER of components_tests.gyp TBR=jochen ...
6 years, 10 months ago (2014-02-13 14:54:58 UTC) #9
droger
The CQ bit was checked by droger@chromium.org
6 years, 10 months ago (2014-02-13 14:55:31 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/159883002/530001
6 years, 10 months ago (2014-02-13 14:55:58 UTC) #11
Jói
components_tests.gyp LGTM On Thu, Feb 13, 2014 at 2:55 PM, <commit-bot@chromium.org> wrote: > CQ is ...
6 years, 10 months ago (2014-02-13 15:01:56 UTC) #12
battre
dependency of components/translate on components/user_prefs LGTM
6 years, 10 months ago (2014-02-13 15:07:42 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-13 16:34:19 UTC) #14
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) app_list_unittests, ash_unittests, aura_unittests, base_unittests, browser_tests, cacheinvalidation_unittests, ...
6 years, 10 months ago (2014-02-13 16:34:22 UTC) #15
droger
The CQ bit was checked by droger@chromium.org
6 years, 10 months ago (2014-02-13 17:20:13 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/droger@chromium.org/159883002/1010001
6 years, 10 months ago (2014-02-13 17:20:48 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/159883002/1010001
6 years, 10 months ago (2014-02-13 19:51:18 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-13 23:35:20 UTC) #19
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=201751
6 years, 10 months ago (2014-02-13 23:35:22 UTC) #20
droger
The CQ bit was checked by droger@chromium.org
6 years, 10 months ago (2014-02-14 03:20:23 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/159883002/1010001
6 years, 10 months ago (2014-02-14 03:22:21 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-14 06:08:17 UTC) #23
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=202030
6 years, 10 months ago (2014-02-14 06:08:18 UTC) #24
droger
The CQ bit was checked by droger@chromium.org
6 years, 10 months ago (2014-02-14 09:22:58 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/droger@chromium.org/159883002/1360001
6 years, 10 months ago (2014-02-14 09:23:30 UTC) #26
jochen (gone - plz use gerrit)
lgtm
6 years, 10 months ago (2014-02-14 09:35:12 UTC) #27
commit-bot: I haz the power
Change committed as 251305
6 years, 10 months ago (2014-02-14 14:11:09 UTC) #28
tfarina
https://codereview.chromium.org/159883002/diff/1360001/components/translate.gypi File components/translate.gypi (right): https://codereview.chromium.org/159883002/diff/1360001/components/translate.gypi#newcode14 components/translate.gypi:14: 'user_prefs', By depending on this, now translate_core_browser does also ...
6 years, 7 months ago (2014-05-11 23:27:01 UTC) #29
tfarina
On 2014/05/11 23:27:01, tfarina wrote: > https://codereview.chromium.org/159883002/diff/1360001/components/translate.gypi > File components/translate.gypi (right): > > https://codereview.chromium.org/159883002/diff/1360001/components/translate.gypi#newcode14 > ...
6 years, 7 months ago (2014-05-11 23:35:13 UTC) #30
droger
https://codereview.chromium.org/159883002/diff/1360001/components/translate.gypi File components/translate.gypi (right): https://codereview.chromium.org/159883002/diff/1360001/components/translate.gypi#newcode14 components/translate.gypi:14: 'user_prefs', On 2014/05/11 23:27:02, tfarina wrote: > By depending ...
6 years, 7 months ago (2014-05-12 08:24:08 UTC) #31
blundell
6 years, 7 months ago (2014-05-12 08:29:26 UTC) #32
Message was sent while issue was closed.
On 2014/05/11 23:35:13, tfarina wrote:
> On 2014/05/11 23:27:01, tfarina wrote:
> >
>
https://codereview.chromium.org/159883002/diff/1360001/components/translate.gypi
> > File components/translate.gypi (right):
> > 
> >
>
https://codereview.chromium.org/159883002/diff/1360001/components/translate.g...
> > components/translate.gypi:14: 'user_prefs',
> > By depending on this, now translate_core_browser does also depends on
> > content_browser. Do we want that in core target?
> 
> My patch in  https://codereview.chromium.org/271793003/ helps with this, but I
> need to update the deps there.

Unless I'm missing something, your CL there fixes this problem.

Thanks,

Colin

Powered by Google App Engine
This is Rietveld 408576698