Kinuko--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
The intent is for Chromium to use MACRO_STYLE for enum names instead of kConstantStyle. Chromium was initially developed when MACRO_STYLE was the rule in the Google C++ Style Guide, and we added that text to the Chromium style guide in an effort to avoid the inconsistency that would result from adopting kConstantStyle for enum names. I agree that the Chromium style guide could be clearer about this being an unconditional MUST.
I've had people tell me in code reviews that both are allowed per style guide. The wording was pretty ambiguous before.
- a, via phone
On Tue, Sep 11, 2012 at 10:09 AM, James Robinson <jam...@google.com> wrote:
https://groups.google.com/a/chromium.org/d/msg/chromium-dev/U7GzRf_5F7s/pmVAjay5CwMJ proposed using SHOUTING_STYLE to be able to share enum names with java code, FWIW.
Is the outcome of this discussion using SHOUTING_STYLE is actually beneficial?
--
+joth, to comment on whether or not clank ended up depending on MACRO_STYLE enum values.
So in the case we were looking at, the net_errors_list.h is already very much using MARCO_STYLE anyway, so was indeed easy to rely on this in the build step the generates the java-side copy of that file (as illustrated by its usage in this basic test)
I can only imagine we will add more code that uses the same trick, where it makes sense. e.g. NavigationController::LoadURLType would be one candidate. Right now we use not to pretty code to copy the constant values across from native to java on startup (see initializeConstants here)But regardless of the plumbing to achieve it, MARCO_STYLE allows us to have a consistent name for a given constant which is aids tracing call paths across the boundary (and being cross-language, grep-friendliness helps a lot)