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

Issue 10579002: Cleanup: merging three different constants.h into a single header. (Closed)

Created:
8 years, 6 months ago by alexeypa (please no reviews)
Modified:
8 years, 6 months ago
CC:
chromium-reviews, jamiewalch+watch_chromium.org, dcaiafa+watch_chromium.org, simonmorris+watch_chromium.org, hclam+watch_chromium.org, wez+watch_chromium.org, amit, sanjeevr, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, pam+watch_chromium.org, alexeypa+watch_chromium.org, sergeyu+watch_chromium.org
Visibility:
Public.

Description

Cleanup: merging three different constants.h into a single header.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -93 lines) Patch
M remoting/base/constants.h View 2 chunks +41 lines, -0 lines 0 comments Download
M remoting/base/constants.cc View 1 chunk +7 lines, -0 lines 0 comments Download
D remoting/host/constants.h View 1 chunk +0 lines, -36 lines 0 comments Download
D remoting/host/constants_win.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M remoting/host/heartbeat_sender.cc View 1 chunk +0 lines, -1 line 0 comments Download
M remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh View 1 chunk +1 line, -1 line 0 comments Download
D remoting/host/plugin/constants.h View 1 chunk +0 lines, -25 lines 0 comments Download
M remoting/host/plugin/daemon_installer_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/plugin/host_plugin.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/remoting_me2me_host.cc View 1 chunk +0 lines, -1 line 0 comments Download
M remoting/host/simple_host_process.cc View 1 chunk +0 lines, -1 line 0 comments Download
M remoting/host/usage_stats_consent_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/wts_session_process_launcher_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/remoting.gyp View 8 chunks +5 lines, -9 lines 2 comments Download
M remoting/tools/me2me_virtual_host.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
alexeypa (please no reviews)
Please take a look.
8 years, 6 months ago (2012-06-18 20:15:45 UTC) #1
simonmorris
This widens the scope of each constant. Are you sure the cost of doing so ...
8 years, 6 months ago (2012-06-18 20:30:12 UTC) #2
alexeypa (please no reviews)
On 2012/06/18 20:30:12, simonmorris wrote: > This widens the scope of each constant. Are you ...
8 years, 6 months ago (2012-06-18 20:33:29 UTC) #3
alexeypa (please no reviews)
http://codereview.chromium.org/10579002/diff/1/remoting/remoting.gyp File remoting/remoting.gyp (right): http://codereview.chromium.org/10579002/diff/1/remoting/remoting.gyp#newcode512 remoting/remoting.gyp:512: 'remoting_base', On 2012/06/18 20:30:12, simonmorris wrote: > Is this ...
8 years, 6 months ago (2012-06-18 20:34:02 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alexeypa@chromium.org/10579002/1
8 years, 6 months ago (2012-06-18 20:34:20 UTC) #5
commit-bot: I haz the power
Try job failure for 10579002-1 (retry) on linux_rel for step "compile" (clobber build). It's a ...
8 years, 6 months ago (2012-06-18 20:59:29 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alexeypa@chromium.org/10579002/1
8 years, 6 months ago (2012-06-18 21:09:02 UTC) #7
Wez
On 2012/06/18 20:15:45, alexeypa wrote: > Please take a look. This seems the wrong direction ...
8 years, 6 months ago (2012-06-18 21:15:52 UTC) #8
Do not use (sergeyu)
On Mon, Jun 18, 2012 at 2:15 PM, <wez@chromium.org> wrote: > On 2012/06/18 20:15:45, alexeypa ...
8 years, 6 months ago (2012-06-18 21:28:06 UTC) #9
alexeypa (please no reviews)
On 2012/06/18 21:15:52, Wez wrote: > This seems the wrong direction to go in; better ...
8 years, 6 months ago (2012-06-18 21:36:34 UTC) #10
Lambros
> In short my point is that it would be nice to have a single ...
8 years, 6 months ago (2012-06-18 22:33:02 UTC) #11
Do not use (sergeyu)
8 years, 6 months ago (2012-06-19 00:16:47 UTC) #12
This is obviously a bikeshed discussion. Let's not waste too much time on
it. Having said that below is my last opinion on that issue :)

Yes I agree that there may be some strings for which it still makes sense
to have base/constants.h. kChromotingXmlNamespace is an example of such
constants. What I think we should avoid is to making that file a dumping
ground for all sorts of unrelated constants (take a look at libjingle's
constants.cc file as an example of unmanageable mess we can get here). For
example all channel names, currently defined in base/constants.h, but don't
really belong there because they used only by the protocol
code. kMimeTypeTextUtf8 is in the same category - it used only by some
clipboard code.

On Mon, Jun 18, 2012 at 3:33 PM, <lambroslambrou@chromium.org> wrote:

>  In short my point is that it would be nice to have a single place where a
>> constant is defined. However it is not helpful that all those files are
>> named
>> constants.h. :-) Feel free to suggest were you think it will be better to
>> put
>> them.
>>
> I've done a search in Chrome for all files containing the word 'constants'.
> There are a lot of files named 'constants.h' and 'constants.cc'.  There
> are also
> many instances of adding a prefix reflecting the scope of the constants
> (even
> when the prefix name is already a folder in the path), for example:
> ./chrome/browser/policy/**policy_constants.h
> ./chrome/browser/ui/panels/**panel_constants.h
> ./chrome/common/chrome_**constants.h
> ./chrome/common/extensions/**extension_constants.h
> ./chrome/common/net/gaia/gaia_**constants.h
>
> So I vote for:
> base/constants.h,
> host/host_constants.h
> client/client_constants.h
>
>
>
http://codereview.chromium.**org/10579002/<http://codereview.chromium.org/105...
>



-- 
Sergey Ulanov

Powered by Google App Engine
This is Rietveld 408576698