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

Issue 1458653002: New build flag system, convert Google Now flag (Closed)

Created:
5 years, 1 month ago by brettw
Modified:
5 years ago
Reviewers:
Mark Mentovai, spang
CC:
chromium-reviews, dbeam+watch-options_chromium.org, chromium-apps-reviews_chromium.org, michaelpg+watch-options_chromium.org, extensions-reviews_chromium.org, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

New build flag system, convert Google Now flag This generates headers with build flags rather than forcing them all to be global. It includes an accessor wrapper so that references to the flags will fail if the proper header is not included. Converts Google Now to use this and remove the global google now define and grit define. Adds support for grit define values of "true" and "false" for ease of integration with GN (they are mapped to the corresponding Python "True" and "False"). Adds dependencies from the main gyp targets to the new generated feature define target. Since GYP only does hard dependencies one level, this should reduce the chance that somebody adds more of these cases and forces to add a dependency. Committed: https://crrev.com/3118dde528359280fa0cb3c6fc5b6323e834c514 Cr-Commit-Position: refs/heads/master@{#361527}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : tweak includes #

Patch Set 7 : merge #

Total comments: 46

Patch Set 8 : some review comments #

Patch Set 9 : Review comments + fixes #

Patch Set 10 : [] for includes #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : GYP #

Total comments: 14

Patch Set 14 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+525 lines, -38 lines) Patch
A build/buildflag.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +47 lines, -0 lines 0 comments Download
A build/buildflag_header.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +138 lines, -0 lines 0 comments Download
A build/buildflag_header.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +118 lines, -0 lines 0 comments Download
M build/common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +0 lines, -12 lines 0 comments Download
M build/config/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -3 lines 0 comments Download
M build/config/features.gni View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -2 lines 0 comments Download
M build/gypi_to_gn.py View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
A build/write_buildflag_header.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +95 lines, -0 lines 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/component_loader.cc View 1 2 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/resources/BUILD.gn View 1 2 12 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/ui/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/content_settings_handler.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/options/options_ui.cc View 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_android.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_child.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/chrome_debugger.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_exe.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -1 line 0 comments Download
A chrome/chrome_features.gypi View 1 2 3 1 chunk +31 lines, -0 lines 0 comments Download
M chrome/chrome_plugin.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_resources.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/chrome_utility.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +9 lines, -0 lines 0 comments Download
A chrome/common/features.gni View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M tools/grit/grit/util.py View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M tools/grit/grit_rule.gni View 1 2 1 chunk +0 lines, -7 lines 0 comments Download

Messages

Total messages: 75 (28 generated)
brettw
5 years, 1 month ago (2015-11-18 23:24:16 UTC) #4
brettw
5 years, 1 month ago (2015-11-18 23:24:27 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458653002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458653002/60001
5 years, 1 month ago (2015-11-18 23:25:42 UTC) #8
chromium-reviews
Wrong Mark I think? On Wed, Nov 18, 2015 at 3:24 PM <brettw@chromium.org> wrote: > ...
5 years, 1 month ago (2015-11-18 23:27:04 UTC) #9
brettw
Yes, sorry, already fixed (autocomplete fail).
5 years, 1 month ago (2015-11-18 23:32:38 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_rel/builds/31851)
5 years, 1 month ago (2015-11-18 23:38:57 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458653002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458653002/60001
5 years, 1 month ago (2015-11-19 05:55:14 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/148460) cast_shell_android on ...
5 years, 1 month ago (2015-11-19 05:59:36 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458653002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458653002/80001
5 years, 1 month ago (2015-11-19 18:55:06 UTC) #18
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/146980) android_clang_dbg_recipe on ...
5 years, 1 month ago (2015-11-19 19:01:34 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458653002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458653002/100001
5 years, 1 month ago (2015-11-19 19:28:59 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_ng/builds/16190) mac_chromium_compile_dbg_ng on ...
5 years, 1 month ago (2015-11-19 19:33:43 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458653002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458653002/120001
5 years, 1 month ago (2015-11-19 20:31:11 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/147042) android_clang_dbg_recipe on ...
5 years, 1 month ago (2015-11-19 20:43:46 UTC) #28
Mark Mentovai
https://codereview.chromium.org/1458653002/diff/120001/build/build_header.gni File build/build_header.gni (right): https://codereview.chromium.org/1458653002/diff/120001/build/build_header.gni#newcode5 build/build_header.gni:5: # Generates a header with preprocessor defines specified by ...
5 years, 1 month ago (2015-11-19 21:52:56 UTC) #29
Mark Mentovai
https://codereview.chromium.org/1458653002/diff/120001/build/build_header.h File build/build_header.h (right): https://codereview.chromium.org/1458653002/diff/120001/build/build_header.h#newcode1 build/build_header.h:1: // Copyright 2015 The Chromium Authors. All rights reserved. ...
5 years, 1 month ago (2015-11-19 21:53:26 UTC) #30
brettw
This addresses the comments up to the python file. I had a few questions and ...
5 years, 1 month ago (2015-11-20 00:02:37 UTC) #32
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458653002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458653002/140001
5 years, 1 month ago (2015-11-20 00:06:29 UTC) #34
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, no build URL) ...
5 years, 1 month ago (2015-11-20 00:18:30 UTC) #36
brettw
https://codereview.chromium.org/1458653002/diff/120001/build/build_header.h File build/build_header.h (right): https://codereview.chromium.org/1458653002/diff/120001/build/build_header.h#newcode26 build/build_header.h:26: #define BUILDFLAG(flag) (BUILDFLAG_CAT2(BUILDFLAG_FLAG_VALUE_, flag) / BUILDFLAG_CAT2(BUILDFLAG_DEFINE_CHECK_, BUILDFLAG_CAT2(BUILDFLAG_FLAG_VALUE_, flag))) // ...
5 years, 1 month ago (2015-11-20 04:10:39 UTC) #37
brettw
New snap up. https://codereview.chromium.org/1458653002/diff/120001/build/write_build_header.py File build/write_build_header.py (right): https://codereview.chromium.org/1458653002/diff/120001/build/write_build_header.py#newcode36 build/write_build_header.py:36: parser.add_option('--path-for-guard', Yes, this is nicer. Changed. ...
5 years, 1 month ago (2015-11-20 18:47:23 UTC) #38
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458653002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458653002/160001
5 years, 1 month ago (2015-11-20 18:48:07 UTC) #40
Mark Mentovai
I was going to poke at MSVC a little bit to see if I could ...
5 years, 1 month ago (2015-11-20 18:49:26 UTC) #41
spang
https://codereview.chromium.org/1458653002/diff/120001/build/build_header.h File build/build_header.h (right): https://codereview.chromium.org/1458653002/diff/120001/build/build_header.h#newcode26 build/build_header.h:26: #define BUILDFLAG(flag) (BUILDFLAG_CAT2(BUILDFLAG_FLAG_VALUE_, flag) / BUILDFLAG_CAT2(BUILDFLAG_DEFINE_CHECK_, BUILDFLAG_CAT2(BUILDFLAG_FLAG_VALUE_, flag))) // ...
5 years, 1 month ago (2015-11-20 19:00:24 UTC) #43
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/147592) android_clang_dbg_recipe on ...
5 years, 1 month ago (2015-11-20 19:01:23 UTC) #45
brettw
On 2015/11/20 18:49:26, Mark Mentovai wrote: > I was going to poke at MSVC a ...
5 years, 1 month ago (2015-11-20 20:26:25 UTC) #46
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458653002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458653002/180001
5 years, 1 month ago (2015-11-20 21:00:38 UTC) #48
brettw
If we agree on the current approach as opposed to GET_FOO(), then it might be ...
5 years, 1 month ago (2015-11-20 22:11:34 UTC) #49
Mark Mentovai
I do basically agree with the overall direction of where this stands now. I still ...
5 years, 1 month ago (2015-11-20 22:24:58 UTC) #50
brettw
On 2015/11/20 22:24:58, Mark Mentovai wrote: > I do basically agree with the overall direction ...
5 years, 1 month ago (2015-11-20 22:29:32 UTC) #51
Mark Mentovai
On 2015/11/20 22:29:32, brettw wrote: > On 2015/11/20 22:24:58, Mark Mentovai wrote: > > I ...
5 years, 1 month ago (2015-11-20 22:40:08 UTC) #52
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-20 22:42:58 UTC) #54
brettw
On 2015/11/20 22:40:08, Mark Mentovai wrote: > On 2015/11/20 22:29:32, brettw wrote: > > On ...
5 years, 1 month ago (2015-11-20 23:00:54 UTC) #55
Mark Mentovai
OK. Lemme spend a little time poking at MSVC to see if I can find ...
5 years, 1 month ago (2015-11-20 23:05:44 UTC) #56
Mark Mentovai
How do you like this? #define BUILDFLAG(flag) ((BUILDFLAG_INTERNAL_ ## flag ())) In the generated headers, ...
5 years ago (2015-11-23 14:14:58 UTC) #57
brettw
On 2015/11/23 14:14:58, Mark Mentovai wrote: > How do you like this? > > #define ...
5 years ago (2015-11-23 20:16:45 UTC) #58
brettw
Suggestion implemented, PTAL. This does the function-style getters, removes the "variables" thing, and puts parens ...
5 years ago (2015-11-23 23:02:09 UTC) #59
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458653002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458653002/220001
5 years ago (2015-11-23 23:05:44 UTC) #61
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromeos_x86-generic_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-generic_chromium_compile_only_ng/builds/61133) mac_chromium_rel_ng on ...
5 years ago (2015-11-23 23:29:59 UTC) #63
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458653002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458653002/240001
5 years ago (2015-11-24 00:14:27 UTC) #65
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/133256)
5 years ago (2015-11-24 03:50:28 UTC) #67
Mark Mentovai
LGTM https://codereview.chromium.org/1458653002/diff/240001/build/build_header.gni File build/build_header.gni (right): https://codereview.chromium.org/1458653002/diff/240001/build/build_header.gni#newcode95 build/build_header.gni:95: # "SPAM_SERVER_URL=\"http://www.example.com/"", Missing a backslash. https://codereview.chromium.org/1458653002/diff/240001/build/build_header.gypi File build/build_header.gypi ...
5 years ago (2015-11-24 14:33:33 UTC) #68
brettw
https://codereview.chromium.org/1458653002/diff/240001/build/build_header.gni File build/build_header.gni (right): https://codereview.chromium.org/1458653002/diff/240001/build/build_header.gni#newcode95 build/build_header.gni:95: # "SPAM_SERVER_URL=\"http://www.example.com/"", On 2015/11/24 14:33:33, Mark Mentovai wrote: > ...
5 years ago (2015-11-24 23:36:01 UTC) #69
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1458653002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1458653002/260001
5 years ago (2015-11-24 23:37:59 UTC) #72
commit-bot: I haz the power
Committed patchset #14 (id:260001)
5 years ago (2015-11-25 02:44:34 UTC) #73
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/3118dde528359280fa0cb3c6fc5b6323e834c514 Cr-Commit-Position: refs/heads/master@{#361527}
5 years ago (2015-11-25 02:45:32 UTC) #74
raymes
5 years ago (2015-11-25 03:09:36 UTC) #75
Message was sent while issue was closed.
A revert of this CL (patchset #14 id:260001) has been created in
https://codereview.chromium.org/1475883002/ by raymes@chromium.org.

The reason for reverting is: This seems to have broken webkit builders:
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win%20Builder/....

Powered by Google App Engine
This is Rietveld 408576698