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

Issue 692733003: Compile Android using GRIT's new --no-output-all-resource-defines flag. (Closed)

Created:
6 years, 1 month ago by newt (away)
Modified:
6 years, 1 month ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, arv+watch_chromium.org, oshima+watch_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Compile Android using GRIT's new --no-output-all-resource-defines flag. This flag causes GRIT to include the same resources in generated .h files as are included in the PAK files. This seems like an obvious thing to do, right? Well, before this CL, *every* resource from the GRD file was listed in the .h file, even resources inside of <if> statements that evaluated to false. As a result, it was possible to reference a resource (e.g. IDS_FOO) in a .cc file, even if IDS_FOO was excluded from the PAK file. What happened at runtime? Crash! This change brings compile-time safety to resource loading: the crash mentioned above would now be a compile failure since IDS_FOO is no longer in the generated .h file. BUG=428947 Committed: https://crrev.com/0548dfae799a5423abd007f2f9d8ea0a1d5d571b Cr-Commit-Position: refs/heads/master@{#303180}

Patch Set 1 #

Patch Set 2 : real fixes #

Patch Set 3 : use --no-output-all-resource-defines #

Total comments: 3

Patch Set 4 : ifdefs in printing code #

Total comments: 2

Patch Set 5 : merged two ifdefs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -15 lines) Patch
M build/common.gypi View 1 2 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/resources_util_unittest.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/search/instant_service.cc View 1 4 chunks +4 lines, -2 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/renderer/printing/print_web_view_helper.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/renderer/printing/print_web_view_helper.cc View 1 2 3 4 4 chunks +8 lines, -6 lines 0 comments Download
M chrome/renderer/printing/print_web_view_helper_linux.cc View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M ui/resources/ui_resources.grd View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 21 (4 generated)
lliabraa
Thanks for putting this together. I've launches some tryjobs to see if this affects other ...
6 years, 1 month ago (2014-10-30 13:45:13 UTC) #2
newt (away)
On 2014/10/30 13:45:13, lliabraa wrote: > Thanks for putting this together. I've launches some tryjobs ...
6 years, 1 month ago (2014-10-30 16:29:58 UTC) #3
lliabraa
On 2014/10/30 16:29:58, newt wrote: > On 2014/10/30 13:45:13, lliabraa wrote: > > Thanks for ...
6 years, 1 month ago (2014-11-03 13:16:50 UTC) #4
newt (away)
vitalybuka: Could you look at my question in chrome/renderer/printing/print_web_view_helper.cc ? https://codereview.chromium.org/692733003/diff/40001/chrome/renderer/printing/print_web_view_helper.cc File chrome/renderer/printing/print_web_view_helper.cc (right): https://codereview.chromium.org/692733003/diff/40001/chrome/renderer/printing/print_web_view_helper.cc#newcode474 ...
6 years, 1 month ago (2014-11-06 09:13:03 UTC) #6
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/692733003/diff/40001/chrome/renderer/printing/print_web_view_helper.cc File chrome/renderer/printing/print_web_view_helper.cc (right): https://codereview.chromium.org/692733003/diff/40001/chrome/renderer/printing/print_web_view_helper.cc#newcode474 chrome/renderer/printing/print_web_view_helper.cc:474: 0));//IDR_PRINT_PREVIEW_PAGE)); PrintWebViewHelper::PrintHeaderAndFooter should not be called on android. You ...
6 years, 1 month ago (2014-11-06 09:38:02 UTC) #7
Vitaly Buka (NO REVIEWS)
On 2014/11/06 09:38:02, Vitaly Buka wrote: > https://codereview.chromium.org/692733003/diff/40001/chrome/renderer/printing/print_web_view_helper.cc > File chrome/renderer/printing/print_web_view_helper.cc (right): > > https://codereview.chromium.org/692733003/diff/40001/chrome/renderer/printing/print_web_view_helper.cc#newcode474 ...
6 years, 1 month ago (2014-11-06 09:41:50 UTC) #8
Vitaly Buka (NO REVIEWS)
https://codereview.chromium.org/692733003/diff/40001/chrome/renderer/printing/print_web_view_helper.cc File chrome/renderer/printing/print_web_view_helper.cc (right): https://codereview.chromium.org/692733003/diff/40001/chrome/renderer/printing/print_web_view_helper.cc#newcode474 chrome/renderer/printing/print_web_view_helper.cc:474: 0));//IDR_PRINT_PREVIEW_PAGE)); On 2014/11/06 09:38:02, Vitaly Buka wrote: > PrintWebViewHelper::PrintHeaderAndFooter ...
6 years, 1 month ago (2014-11-06 09:48:19 UTC) #9
lliabraa
LGTM pending fix in print_web_view_helper.cc
6 years, 1 month ago (2014-11-06 19:08:37 UTC) #10
newt (away)
vitalybuka: Thanks for the suggestions. PTAL.
6 years, 1 month ago (2014-11-06 19:14:42 UTC) #11
Vitaly Buka (NO REVIEWS)
lgtm https://codereview.chromium.org/692733003/diff/60001/chrome/renderer/printing/print_web_view_helper.cc File chrome/renderer/printing/print_web_view_helper.cc (right): https://codereview.chromium.org/692733003/diff/60001/chrome/renderer/printing/print_web_view_helper.cc#newcode75 chrome/renderer/printing/print_web_view_helper.cc:75: why not to combine both blocks?
6 years, 1 month ago (2014-11-06 19:34:24 UTC) #12
newt (away)
https://codereview.chromium.org/692733003/diff/60001/chrome/renderer/printing/print_web_view_helper.cc File chrome/renderer/printing/print_web_view_helper.cc (right): https://codereview.chromium.org/692733003/diff/60001/chrome/renderer/printing/print_web_view_helper.cc#newcode75 chrome/renderer/printing/print_web_view_helper.cc:75: On 2014/11/06 19:34:24, Vitaly Buka wrote: > why not ...
6 years, 1 month ago (2014-11-06 19:50:38 UTC) #13
newt (away)
samarth: chrome/browser/search/instant_service.cc oshima: ui/resources/ui_resources.grd thakis: chrome/browser/resources_util_unittest.cc PTAL. Thanks!
6 years, 1 month ago (2014-11-06 19:56:47 UTC) #15
Nico
chrome/browser/resources_util_unittest.cc lgtm
6 years, 1 month ago (2014-11-06 19:59:53 UTC) #16
oshima
ui/resources lgtm
6 years, 1 month ago (2014-11-06 20:00:16 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/692733003/80001
6 years, 1 month ago (2014-11-07 02:35:11 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:80001)
6 years, 1 month ago (2014-11-07 03:39:18 UTC) #20
commit-bot: I haz the power
6 years, 1 month ago (2014-11-07 03:40:44 UTC) #21
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/0548dfae799a5423abd007f2f9d8ea0a1d5d571b
Cr-Commit-Position: refs/heads/master@{#303180}

Powered by Google App Engine
This is Rietveld 408576698