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

Issue 2710673002: Add Mojo constant for "ash" and replace hardcoded strings (Closed)

Created:
3 years, 10 months ago by fwang
Modified:
3 years, 10 months ago
CC:
chromium-reviews, sadrul, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, kalyank, darin (slow to review)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add Mojo constant for "ash" and replace hardcoded strings Currently, the default window manager for mash is always "ash" and its name is hardcoded in mash/common/config.cc. This CL does the following: * Add a Mojo interface to expose the "ash" service name and use it as the default value returned by GetWindowManagerServiceName() when OS_CHROMEOS=1. * Make GetWindowManagerServiceName() returns an empty name when OS_CHROMEOS=0 and no window manager is specified. When logging is enabled, a fatal error is raised with a hint about --window-manager. * Replace other hardcoded "ash" strings in ash/ R=ben@chromium.org,sky@chromium.org,dcheng@chromium.org BUG=None Review-Url: https://codereview.chromium.org/2710673002 Cr-Commit-Position: refs/heads/master@{#453075} Committed: https://chromium.googlesource.com/chromium/src/+/d59b434b8e4e0abfaf156292272fb43a724d9e04

Patch Set 1 #

Patch Set 2 : Fix dep of simple_wm constants and (for completeness) make mojo interfaces a dep of simple_wm; add … #

Total comments: 3

Patch Set 3 : Only add "ash" Mojo constant and add fatal error when USE_ASH=0 #

Total comments: 1

Patch Set 4 : Address dcheng's feedback. #

Patch Set 5 : Replace more hardcoded "ash" strings #

Total comments: 2

Patch Set 6 : Move conditional include down. #

Total comments: 5

Patch Set 7 : s/USE_ASH/OS_CHROMEOS/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -4 lines) Patch
M ash/mus/app_launch_unittest.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M ash/mus/window_manager_unittest.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M ash/public/interfaces/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A ash/public/interfaces/constants.mojom View 1 chunk +7 lines, -0 lines 0 comments Download
M mash/common/BUILD.gn View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M mash/common/config.cc View 1 2 3 4 5 6 2 chunks +11 lines, -2 lines 0 comments Download

Messages

Total messages: 38 (21 generated)
tonikitoo
https://codereview.chromium.org/2710673002/diff/20001/mash/common/config.cc File mash/common/config.cc (right): https://codereview.chromium.org/2710673002/diff/20001/mash/common/config.cc#newcode29 mash/common/config.cc:29: return mash::simple_wm::mojom::kServiceName; I believe there is a slightly behavior ...
3 years, 10 months ago (2017-02-21 14:29:46 UTC) #8
fwang
PTAL https://codereview.chromium.org/2710673002/diff/20001/mash/common/config.cc File mash/common/config.cc (right): https://codereview.chromium.org/2710673002/diff/20001/mash/common/config.cc#newcode29 mash/common/config.cc:29: return mash::simple_wm::mojom::kServiceName; On 2017/02/21 14:29:46, tonikitoo wrote: > ...
3 years, 10 months ago (2017-02-21 14:34:20 UTC) #9
dcheng
Are there plans to use these constants elsewhere? It seems pretty heavyweight to put them ...
3 years, 10 months ago (2017-02-21 23:54:42 UTC) #12
fwang
On 2017/02/21 23:54:42, dcheng wrote: > Are there plans to use these constants elsewhere? It ...
3 years, 10 months ago (2017-02-22 07:12:59 UTC) #14
dcheng
mojo lgtm https://codereview.chromium.org/2710673002/diff/40001/mash/common/config.cc File mash/common/config.cc (right): https://codereview.chromium.org/2710673002/diff/40001/mash/common/config.cc#newcode29 mash/common/config.cc:29: return ""; Nit: std::string() is more efficient ...
3 years, 10 months ago (2017-02-22 18:01:08 UTC) #15
fwang
I replaced more "ash" strings. PTAL
3 years, 10 months ago (2017-02-24 17:28:04 UTC) #20
sky
https://codereview.chromium.org/2710673002/diff/80001/mash/common/config.cc File mash/common/config.cc (right): https://codereview.chromium.org/2710673002/diff/80001/mash/common/config.cc#newcode7 mash/common/config.cc:7: #if defined(USE_ASH) Conditional includes are after other includes.
3 years, 10 months ago (2017-02-24 18:40:07 UTC) #23
fwang
https://codereview.chromium.org/2710673002/diff/80001/mash/common/config.cc File mash/common/config.cc (right): https://codereview.chromium.org/2710673002/diff/80001/mash/common/config.cc#newcode7 mash/common/config.cc:7: #if defined(USE_ASH) On 2017/02/24 18:40:07, sky wrote: > Conditional ...
3 years, 10 months ago (2017-02-24 18:51:05 UTC) #24
tonikitoo
infotmsl L G T M modulo one bit. https://codereview.chromium.org/2710673002/diff/100001/mash/common/config.cc File mash/common/config.cc (right): https://codereview.chromium.org/2710673002/diff/100001/mash/common/config.cc#newcode27 mash/common/config.cc:27: #else ...
3 years, 10 months ago (2017-02-24 19:03:22 UTC) #25
fwang
https://codereview.chromium.org/2710673002/diff/100001/mash/common/config.cc File mash/common/config.cc (right): https://codereview.chromium.org/2710673002/diff/100001/mash/common/config.cc#newcode27 mash/common/config.cc:27: #else On 2017/02/24 19:03:21, tonikitoo wrote: Is this GetWindowManagerServiceName() ...
3 years, 10 months ago (2017-02-24 19:19:58 UTC) #26
sky
https://codereview.chromium.org/2710673002/diff/100001/mash/common/config.cc File mash/common/config.cc (right): https://codereview.chromium.org/2710673002/diff/100001/mash/common/config.cc#newcode27 mash/common/config.cc:27: #else On 2017/02/24 19:19:58, fwang wrote: > On 2017/02/24 ...
3 years, 10 months ago (2017-02-24 21:18:43 UTC) #27
tonikitoo
On 2017/02/24 21:18:43, sky wrote: > https://codereview.chromium.org/2710673002/diff/100001/mash/common/config.cc > File mash/common/config.cc (right): > > https://codereview.chromium.org/2710673002/diff/100001/mash/common/config.cc#newcode27 > ...
3 years, 10 months ago (2017-02-24 21:23:41 UTC) #28
sky
https://codereview.chromium.org/2710673002/diff/100001/mash/common/config.cc File mash/common/config.cc (right): https://codereview.chromium.org/2710673002/diff/100001/mash/common/config.cc#newcode9 mash/common/config.cc:9: #if defined(USE_ASH) Sorry, we want to get rid of ...
3 years, 10 months ago (2017-02-24 21:36:34 UTC) #29
fwang
https://codereview.chromium.org/2710673002/diff/100001/mash/common/config.cc File mash/common/config.cc (right): https://codereview.chromium.org/2710673002/diff/100001/mash/common/config.cc#newcode9 mash/common/config.cc:9: #if defined(USE_ASH) On 2017/02/24 21:36:34, sky wrote: > Sorry, ...
3 years, 10 months ago (2017-02-24 22:00:08 UTC) #31
sky
LGTM
3 years, 10 months ago (2017-02-25 00:23:40 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2710673002/120001
3 years, 10 months ago (2017-02-25 04:57:30 UTC) #35
commit-bot: I haz the power
3 years, 10 months ago (2017-02-25 06:27:36 UTC) #38
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/d59b434b8e4e0abfaf156292272f...

Powered by Google App Engine
This is Rietveld 408576698