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

Issue 1767603003: [chromecast] Add cast_shell --accept-resource-provider switch (Closed)

Created:
4 years, 9 months ago by jyw
Modified:
4 years, 5 months ago
CC:
chromium-reviews, gunsch+watch_chromium.org, lcwu+watch_chromium.org, halliwell+watch_chromium.org, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[chromecast] Add cast_shell --accept-resource-provider switch and a utility function, GetSwitchValueBoolean. Also has the cast_shell flag --accept-resource-provider imply --alsa-check-close-timeout=0 unless the close timeout is explicitly overridden. BUG=internal b/26091363 TEST=pepperoni build cast_base_unittests --gtest_filter=ChromecastSwitchesTest.* Committed: https://crrev.com/b92b0b2ccec55e07d667315283ba06006bba42db Cr-Commit-Position: refs/heads/master@{#380024}

Patch Set 1 #

Patch Set 2 : bool -> int #

Total comments: 16

Patch Set 3 : unittests and comment-addressing #

Patch Set 4 : use kSwitchValue{True,False} and fix DONOTSUBMIT comment #

Total comments: 4

Patch Set 5 : #

Total comments: 4

Patch Set 6 : fix nits #

Total comments: 2

Patch Set 7 : remove ret variable #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -3 lines) Patch
M chromecast/base/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chromecast/base/chromecast_switches.h View 1 2 3 4 3 chunks +21 lines, -0 lines 0 comments Download
M chromecast/base/chromecast_switches.cc View 1 2 3 4 5 6 4 chunks +39 lines, -1 line 1 comment Download
A chromecast/base/chromecast_switches_unittest.cc View 1 2 3 4 5 1 chunk +61 lines, -0 lines 2 comments Download
M chromecast/chromecast_tests.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc View 1 2 3 4 1 chunk +6 lines, -2 lines 0 comments Download

Messages

Total messages: 36 (13 generated)
jyw
4 years, 9 months ago (2016-03-04 23:55:23 UTC) #3
halliwell
Commit message shouldn't be phrased as 'upstream XXX'. This will be the origin of this ...
4 years, 9 months ago (2016-03-05 01:01:51 UTC) #6
halliwell
https://codereview.chromium.org/1767603003/diff/20001/chromecast/base/chromecast_switches.cc File chromecast/base/chromecast_switches.cc (right): https://codereview.chromium.org/1767603003/diff/20001/chromecast/base/chromecast_switches.cc#newcode85 chromecast/base/chromecast_switches.cc:85: .compare(switches::kSwitchValueFalse) == 0; Also, just remembered: GetSwitchValueASCII returns an ...
4 years, 9 months ago (2016-03-05 01:10:58 UTC) #8
byungchul
https://codereview.chromium.org/1767603003/diff/20001/chromecast/base/chromecast_switches.cc File chromecast/base/chromecast_switches.cc (right): https://codereview.chromium.org/1767603003/diff/20001/chromecast/base/chromecast_switches.cc#newcode77 chromecast/base/chromecast_switches.cc:77: .compare(switches::kSwitchValueFalse); On 2016/03/05 01:01:50, halliwell wrote: > seems like ...
4 years, 9 months ago (2016-03-07 17:19:41 UTC) #9
halliwell
https://codereview.chromium.org/1767603003/diff/20001/chromecast/base/chromecast_switches.cc File chromecast/base/chromecast_switches.cc (right): https://codereview.chromium.org/1767603003/diff/20001/chromecast/base/chromecast_switches.cc#newcode77 chromecast/base/chromecast_switches.cc:77: .compare(switches::kSwitchValueFalse); On 2016/03/07 17:19:40, byungchul wrote: > On 2016/03/05 ...
4 years, 9 months ago (2016-03-07 23:33:55 UTC) #10
kmackay
https://codereview.chromium.org/1767603003/diff/20001/chromecast/base/chromecast_switches.cc File chromecast/base/chromecast_switches.cc (right): https://codereview.chromium.org/1767603003/diff/20001/chromecast/base/chromecast_switches.cc#newcode77 chromecast/base/chromecast_switches.cc:77: .compare(switches::kSwitchValueFalse); On 2016/03/07 17:19:40, byungchul wrote: > On 2016/03/05 ...
4 years, 9 months ago (2016-03-08 00:06:11 UTC) #11
jyw
PTAL https://codereview.chromium.org/1767603003/diff/20001/chromecast/base/chromecast_switches.cc File chromecast/base/chromecast_switches.cc (right): https://codereview.chromium.org/1767603003/diff/20001/chromecast/base/chromecast_switches.cc#newcode5 chromecast/base/chromecast_switches.cc:5: #include "base/command_line.h" On 2016/03/05 01:01:50, halliwell wrote: > ...
4 years, 9 months ago (2016-03-08 02:09:24 UTC) #12
halliwell
https://codereview.chromium.org/1767603003/diff/60001/chromecast/base/chromecast_switches.h File chromecast/base/chromecast_switches.h (right): https://codereview.chromium.org/1767603003/diff/60001/chromecast/base/chromecast_switches.h#newcode48 chromecast/base/chromecast_switches.h:48: It should be 'chromecast' for consistency.
4 years, 9 months ago (2016-03-08 04:29:42 UTC) #15
kmackay
https://codereview.chromium.org/1767603003/diff/60001/chromecast/base/chromecast_switches.cc File chromecast/base/chromecast_switches.cc (right): https://codereview.chromium.org/1767603003/diff/60001/chromecast/base/chromecast_switches.cc#newcode83 chromecast/base/chromecast_switches.cc:83: .compare(switches::kSwitchValueTrue) && I'd really prefer to use == or ...
4 years, 9 months ago (2016-03-08 17:32:48 UTC) #16
jyw
https://codereview.chromium.org/1767603003/diff/60001/chromecast/base/chromecast_switches.cc File chromecast/base/chromecast_switches.cc (right): https://codereview.chromium.org/1767603003/diff/60001/chromecast/base/chromecast_switches.cc#newcode83 chromecast/base/chromecast_switches.cc:83: .compare(switches::kSwitchValueTrue) && On 2016/03/08 17:32:48, kmackay wrote: > I'd ...
4 years, 9 months ago (2016-03-08 22:40:52 UTC) #17
kmackay
lgtm % nits https://codereview.chromium.org/1767603003/diff/80001/chromecast/base/chromecast_switches.cc File chromecast/base/chromecast_switches.cc (right): https://codereview.chromium.org/1767603003/diff/80001/chromecast/base/chromecast_switches.cc#newcode92 chromecast/base/chromecast_switches.cc:92: .compare(switches::kSwitchValueFalse); nit: use != instead of ...
4 years, 9 months ago (2016-03-08 22:51:42 UTC) #18
jyw
https://codereview.chromium.org/1767603003/diff/80001/chromecast/base/chromecast_switches.cc File chromecast/base/chromecast_switches.cc (right): https://codereview.chromium.org/1767603003/diff/80001/chromecast/base/chromecast_switches.cc#newcode92 chromecast/base/chromecast_switches.cc:92: .compare(switches::kSwitchValueFalse); On 2016/03/08 22:51:42, kmackay wrote: > nit: use ...
4 years, 9 months ago (2016-03-08 23:04:57 UTC) #19
halliwell
On 2016/03/08 23:04:57, jyw wrote: > https://codereview.chromium.org/1767603003/diff/80001/chromecast/base/chromecast_switches.cc > File chromecast/base/chromecast_switches.cc (right): > > https://codereview.chromium.org/1767603003/diff/80001/chromecast/base/chromecast_switches.cc#newcode92 > ...
4 years, 9 months ago (2016-03-09 00:39:46 UTC) #20
byungchul
lgtm a nit. https://codereview.chromium.org/1767603003/diff/100001/chromecast/base/chromecast_switches.cc File chromecast/base/chromecast_switches.cc (right): https://codereview.chromium.org/1767603003/diff/100001/chromecast/base/chromecast_switches.cc#newcode92 chromecast/base/chromecast_switches.cc:92: switches::kSwitchValueFalse; If you return here, you ...
4 years, 9 months ago (2016-03-09 01:04:44 UTC) #21
jyw
https://codereview.chromium.org/1767603003/diff/100001/chromecast/base/chromecast_switches.cc File chromecast/base/chromecast_switches.cc (right): https://codereview.chromium.org/1767603003/diff/100001/chromecast/base/chromecast_switches.cc#newcode92 chromecast/base/chromecast_switches.cc:92: switches::kSwitchValueFalse; On 2016/03/09 01:04:44, byungchul wrote: > If you ...
4 years, 9 months ago (2016-03-09 01:12:10 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1767603003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1767603003/120001
4 years, 9 months ago (2016-03-09 01:12:40 UTC) #25
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 9 months ago (2016-03-09 01:46:18 UTC) #27
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/b92b0b2ccec55e07d667315283ba06006bba42db Cr-Commit-Position: refs/heads/master@{#380024}
4 years, 9 months ago (2016-03-09 01:50:59 UTC) #29
alokp
This broke our TOT builder: error: obj/chromecast/base/base/chromecast_switches.o: multiple definition of 'switches::kAcceptResourceProvider' /obj/chromecast/internal/cast/base/base/cast_switches.o: previous definition here
4 years, 9 months ago (2016-03-09 17:58:25 UTC) #31
halliwell
On 2016/03/09 17:58:25, alokp wrote: > This broke our TOT builder: > > error: obj/chromecast/base/base/chromecast_switches.o: ...
4 years, 9 months ago (2016-03-09 17:59:22 UTC) #32
byungchul
https://codereview.chromium.org/1767603003/diff/120001/chromecast/base/chromecast_switches.cc File chromecast/base/chromecast_switches.cc (right): https://codereview.chromium.org/1767603003/diff/120001/chromecast/base/chromecast_switches.cc#newcode84 chromecast/base/chromecast_switches.cc:84: command_line->GetSwitchValueASCII(switch_string) != "") { Why didn't you use a ...
4 years, 9 months ago (2016-03-09 18:16:30 UTC) #33
Lei Zhang
Late drive-by. Please file a bug and fix. https://codereview.chromium.org/1767603003/diff/120001/chromecast/base/chromecast_switches_unittest.cc File chromecast/base/chromecast_switches_unittest.cc (right): https://codereview.chromium.org/1767603003/diff/120001/chromecast/base/chromecast_switches_unittest.cc#newcode13 chromecast/base/chromecast_switches_unittest.cc:13: base::CommandLine::Reset(); ...
4 years, 5 months ago (2016-07-14 10:01:24 UTC) #35
halliwell
4 years, 5 months ago (2016-07-14 13:47:40 UTC) #36
Message was sent while issue was closed.
https://codereview.chromium.org/1767603003/diff/120001/chromecast/base/chrome...
File chromecast/base/chromecast_switches_unittest.cc (right):

https://codereview.chromium.org/1767603003/diff/120001/chromecast/base/chrome...
chromecast/base/chromecast_switches_unittest.cc:13: base::CommandLine::Reset();
On 2016/07/14 10:01:23, Lei Zhang (Slow Thursday) wrote:
> You probably want base::test::ScopedCommandLine instead. This modifies a
global
> shared by all tests in a single process. I think this only works because this
is
> part of cast_base_unittests, which is tiny. If you did this in chrome's
> unit_tests, it would have screwed up the global state badly for other tests
> running as part of the same process.

Thanks, filed crbug.com/628219.

Powered by Google App Engine
This is Rietveld 408576698