New issue
Advanced search Search tips

Issue 611273 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Fix regex to parse Variations UI override strings

Project Member Reported by rajendrant@chromium.org, May 12 2016

Issue description

UI string overrider does not handle #define macros with pragma in them.

For example, builds with enable_resource_whitelist_generation=true could generate generated_resources.h in the following format.

#define IDS_DATA_USE_TRACKING_STARTED_SNACKBAR_MESSAGE _Pragma("whitelisted_resource_18568") 18568

The generated ui_string_overrider_factory.cc file will not have any resource for the above.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e60a3b28edd120d48777c7bd16b5b8e9793e4d57

commit e60a3b28edd120d48777c7bd16b5b8e9793e4d57
Author: rajendrant <rajendrant@chromium.org>
Date: Thu May 12 17:53:16 2016

Fix regex to parse Variations UI override strings

Regex macro used to parse the UI override strings does not work for the
generation enabled. This CL adds support to handle the pragma directive
present in #define macro format.

BUG= 611273 

Review-Url: https://codereview.chromium.org/1969243002
Cr-Commit-Position: refs/heads/master@{#393295}

[modify] https://crrev.com/e60a3b28edd120d48777c7bd16b5b8e9793e4d57/components/variations/service/generate_ui_string_overrider.py

Labels: Merge-Request-51
This change is needed in M51, for the finch UI strings override feature to work. Requesting for approval.

Thanks
Raj

Comment 3 by tin...@google.com, May 13 2016

Labels: -Merge-Request-51 Merge-Approved-51 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M51 (branch: 2704)
Project Member

Comment 4 by bugdroid1@chromium.org, May 13 2016

Labels: -merge-approved-51 merge-merged-2704
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab7b10c36b9f79b8ae73f5ec9d2376640f6a31b3

commit ab7b10c36b9f79b8ae73f5ec9d2376640f6a31b3
Author: Tarun Bansal <tbansal@google.com>
Date: Fri May 13 18:22:02 2016

Fix regex to parse Variations UI override strings

Regex macro used to parse the UI override strings does not work for the
generation enabled. This CL adds support to handle the pragma directive
present in #define macro format.

BUG= 611273 

Review-Url: https://codereview.chromium.org/1969243002
Cr-Commit-Position: refs/heads/master@{#393295}
(cherry picked from commit e60a3b28edd120d48777c7bd16b5b8e9793e4d57)

Review URL: https://codereview.chromium.org/1981483002 .

Cr-Commit-Position: refs/branch-heads/2704@{#541}
Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251}

[modify] https://crrev.com/ab7b10c36b9f79b8ae73f5ec9d2376640f6a31b3/components/variations/service/generate_ui_string_overrider.py

Keeping this bug open to do the following pending items.

Add comments in the following files that generate_ui_string_overrider.py should be updated when pragma directive format changes.
https://code.google.com/p/chromium/codesearch#chromium/src/build/common.gypi&l=2208
https://code.google.com/p/chromium/codesearch#chromium/src/tools/grit/grit_rule.gni&l=362

generate_ui_string_overrider.py script should fail when there are no entries found or there is a parse error in the #define macro lines.

Comment 6 by bengr@chromium.org, Jun 2 2016

Labels: Freighter
Status: Fixed (was: Assigned)

Sign in to add a comment