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

Issue 2517833004: [MR] Cancel auto-switching from tab mirroring to Cast SDK at page navigation based on user pref (Closed)

Created:
4 years ago by takumif
Modified:
4 years ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, media-router+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[MR] Cancel auto-switching from tab mirroring to Cast SDK based on user pref This change makes PresentationServiceDelegateImpl cancel requests to join session if they have the "auto-join" presentation ID and the user pref is set to tab mirroring for the origin. This way, when a page requests to auto-switch from tab mirroring to Cast SDK on a site where the user has chosen to use tab mirroring, the auto-switching gets cancelled. We also change the settings for prefs::kMediaRouterTabMirroringSources, so that cast mode selections made in incognito last only for the lifetime of the incognito profile. This CL relies on a profile pref introduced by https://codereview.chromium.org/2487673003/. BUG=664671 Committed: https://crrev.com/f5da68f68b47ec803e5e9da660c885afb6713efe Cr-Commit-Position: refs/heads/master@{#437699}

Patch Set 1 #

Total comments: 12

Patch Set 2 : Rebase #

Patch Set 3 : Address Mark's comments #

Total comments: 14

Patch Set 4 : Rebase #

Patch Set 5 : Address Derek and Mark's comments #

Patch Set 6 : Add checks for OS_ANDROID #

Total comments: 8

Patch Set 7 : Address Jennifer and Mark's comments #

Patch Set 8 : Make incognito pref non-persistent #

Patch Set 9 : Rebase #

Total comments: 10

Patch Set 10 : Address Mark and Jennifer's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+177 lines, -14 lines) Patch
M chrome/browser/media/router/media_source_helper.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/media/router/media_source_helper.cc View 1 2 3 4 5 6 7 8 9 3 chunks +14 lines, -8 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl.h View 1 2 3 4 5 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl.cc View 1 2 3 4 5 6 7 8 4 chunks +34 lines, -6 lines 0 comments Download
M chrome/browser/media/router/presentation_service_delegate_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +116 lines, -0 lines 0 comments Download
M chrome/browser/prefs/pref_service_syncable_util.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 45 (24 generated)
takumif
This CL implements tab-mirroring override in PresentationServiceDelegateImpl. It depends on the other sticky cast mode ...
4 years ago (2016-11-22 22:10:04 UTC) #8
mark a. foltz
A couple of comments. Unit tests as well please :) https://codereview.chromium.org/2517833004/diff/20001/chrome/browser/media/router/presentation_service_delegate_impl.cc File chrome/browser/media/router/presentation_service_delegate_impl.cc (right): https://codereview.chromium.org/2517833004/diff/20001/chrome/browser/media/router/presentation_service_delegate_impl.cc#newcode49 ...
4 years ago (2016-11-22 22:23:22 UTC) #9
takumif
https://codereview.chromium.org/2517833004/diff/20001/chrome/browser/media/router/presentation_service_delegate_impl.cc File chrome/browser/media/router/presentation_service_delegate_impl.cc (right): https://codereview.chromium.org/2517833004/diff/20001/chrome/browser/media/router/presentation_service_delegate_impl.cc#newcode992 chrome/browser/media/router/presentation_service_delegate_impl.cc:992: ->GetList(prefs::kMediaRouterTabMirroringSources); On 2016/11/22 22:23:21, mark a. foltz wrote: > ...
4 years ago (2016-11-29 23:56:45 UTC) #10
mark a. foltz
https://codereview.chromium.org/2517833004/diff/20001/chrome/browser/media/router/presentation_service_delegate_impl.cc File chrome/browser/media/router/presentation_service_delegate_impl.cc (right): https://codereview.chromium.org/2517833004/diff/20001/chrome/browser/media/router/presentation_service_delegate_impl.cc#newcode992 chrome/browser/media/router/presentation_service_delegate_impl.cc:992: ->GetList(prefs::kMediaRouterTabMirroringSources); On 2016/11/29 at 23:56:45, takumif wrote: > On ...
4 years ago (2016-12-01 00:04:34 UTC) #11
takumif
https://codereview.chromium.org/2517833004/diff/20001/chrome/browser/media/router/presentation_service_delegate_impl.cc File chrome/browser/media/router/presentation_service_delegate_impl.cc (right): https://codereview.chromium.org/2517833004/diff/20001/chrome/browser/media/router/presentation_service_delegate_impl.cc#newcode49 chrome/browser/media/router/presentation_service_delegate_impl.cc:49: const char kAutoJoinPresentationId[] = "auto-join"; On 2016/11/22 22:23:21, mark ...
4 years ago (2016-12-03 00:46:49 UTC) #13
imcheng
lgtm https://codereview.chromium.org/2517833004/diff/80001/chrome/browser/media/router/presentation_service_delegate_impl.cc File chrome/browser/media/router/presentation_service_delegate_impl.cc (right): https://codereview.chromium.org/2517833004/diff/80001/chrome/browser/media/router/presentation_service_delegate_impl.cc#newcode986 chrome/browser/media/router/presentation_service_delegate_impl.cc:986: Profile* profile = would it be sufficient to ...
4 years ago (2016-12-05 20:12:34 UTC) #14
mark a. foltz
https://codereview.chromium.org/2517833004/diff/80001/chrome/browser/media/router/media_source_helper.cc File chrome/browser/media/router/media_source_helper.cc (right): https://codereview.chromium.org/2517833004/diff/80001/chrome/browser/media/router/media_source_helper.cc#newcode28 chrome/browser/media/router/media_source_helper.cc:28: const char kAutoJoinPresentationId[] = "auto-join"; constexpr char https://codereview.chromium.org/2517833004/diff/80001/chrome/browser/media/router/presentation_service_delegate_impl.cc File ...
4 years ago (2016-12-05 21:32:22 UTC) #15
takumif
Thanks for reviewing! https://codereview.chromium.org/2517833004/diff/80001/chrome/browser/media/router/media_source_helper.cc File chrome/browser/media/router/media_source_helper.cc (right): https://codereview.chromium.org/2517833004/diff/80001/chrome/browser/media/router/media_source_helper.cc#newcode28 chrome/browser/media/router/media_source_helper.cc:28: const char kAutoJoinPresentationId[] = "auto-join"; On ...
4 years ago (2016-12-06 02:21:58 UTC) #16
apacible
https://codereview.chromium.org/2517833004/diff/140001/chrome/browser/media/router/presentation_service_delegate_impl.cc File chrome/browser/media/router/presentation_service_delegate_impl.cc (right): https://codereview.chromium.org/2517833004/diff/140001/chrome/browser/media/router/presentation_service_delegate_impl.cc#newcode28 chrome/browser/media/router/presentation_service_delegate_impl.cc:28: #if !defined(OS_ANDROID) nit: move all #if !defined(OS_ANDROID) includes to ...
4 years ago (2016-12-07 00:53:09 UTC) #19
mark a. foltz
https://codereview.chromium.org/2517833004/diff/140001/chrome/browser/media/router/presentation_service_delegate_impl.cc File chrome/browser/media/router/presentation_service_delegate_impl.cc (right): https://codereview.chromium.org/2517833004/diff/140001/chrome/browser/media/router/presentation_service_delegate_impl.cc#newcode842 chrome/browser/media/router/presentation_service_delegate_impl.cc:842: url::Origin origin = url::Origin(GetLastCommittedURLForFrame( Use a const ref https://codereview.chromium.org/2517833004/diff/140001/chrome/browser/media/router/presentation_service_delegate_impl.cc#newcode1003 ...
4 years ago (2016-12-07 04:19:01 UTC) #22
takumif
https://codereview.chromium.org/2517833004/diff/140001/chrome/browser/media/router/presentation_service_delegate_impl.cc File chrome/browser/media/router/presentation_service_delegate_impl.cc (right): https://codereview.chromium.org/2517833004/diff/140001/chrome/browser/media/router/presentation_service_delegate_impl.cc#newcode28 chrome/browser/media/router/presentation_service_delegate_impl.cc:28: #if !defined(OS_ANDROID) On 2016/12/07 00:53:09, apacible wrote: > nit: ...
4 years ago (2016-12-08 00:01:30 UTC) #23
mark a. foltz
On 2016/12/08 at 00:01:30, takumif wrote: > https://codereview.chromium.org/2517833004/diff/140001/chrome/browser/media/router/presentation_service_delegate_impl.cc > File chrome/browser/media/router/presentation_service_delegate_impl.cc (right): > > https://codereview.chromium.org/2517833004/diff/140001/chrome/browser/media/router/presentation_service_delegate_impl.cc#newcode28 ...
4 years ago (2016-12-08 01:16:15 UTC) #24
takumif
On 2016/12/08 01:16:15, mark a. foltz wrote: > On 2016/12/08 at 00:01:30, takumif wrote: > ...
4 years ago (2016-12-08 19:58:21 UTC) #26
takumif
gab@: please take a look at pref_service_syncable_util.cc Thanks!
4 years ago (2016-12-08 19:59:58 UTC) #28
gab
On 2016/12/08 19:59:58, takumif wrote: > gab@: please take a look at pref_service_syncable_util.cc > Thanks! ...
4 years ago (2016-12-08 20:18:56 UTC) #29
mark a. foltz
lgtm Thanks for tracking down the fix on the incognito pref. https://codereview.chromium.org/2517833004/diff/220001/chrome/browser/media/router/presentation_service_delegate_impl.cc File chrome/browser/media/router/presentation_service_delegate_impl.cc (right): ...
4 years ago (2016-12-09 04:07:42 UTC) #30
apacible
lgtm https://codereview.chromium.org/2517833004/diff/220001/chrome/browser/media/router/media_source_helper.cc File chrome/browser/media/router/media_source_helper.cc (right): https://codereview.chromium.org/2517833004/diff/220001/chrome/browser/media/router/media_source_helper.cc#newcode69 chrome/browser/media/router/media_source_helper.cc:69: // compare host, port, scheme, and path prefix ...
4 years ago (2016-12-09 18:04:09 UTC) #31
takumif
Thanks for reviewing! https://codereview.chromium.org/2517833004/diff/220001/chrome/browser/media/router/media_source_helper.cc File chrome/browser/media/router/media_source_helper.cc (right): https://codereview.chromium.org/2517833004/diff/220001/chrome/browser/media/router/media_source_helper.cc#newcode69 chrome/browser/media/router/media_source_helper.cc:69: // compare host, port, scheme, and ...
4 years ago (2016-12-09 19:18:13 UTC) #33
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/2517833004/240001
4 years ago (2016-12-09 22:49:50 UTC) #39
commit-bot: I haz the power
Committed patchset #10 (id:240001)
4 years ago (2016-12-09 23:42:56 UTC) #42
commit-bot: I haz the power
4 years ago (2016-12-12 14:58:40 UTC) #44
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/f5da68f68b47ec803e5e9da660c885afb6713efe
Cr-Commit-Position: refs/heads/master@{#437699}

Powered by Google App Engine
This is Rietveld 408576698