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

Issue 2179803002: arc: Use location service consent. (Closed)

Created:
4 years, 5 months ago by khmel
Modified:
4 years, 4 months ago
Reviewers:
xiyuan, Sergey Poromov
CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, yusukes+watch_chromium.org, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, arv+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

arc: Use location service consent. This adds option to use location service into OptIn flow and fix similar backup and restore consent. BUG=631264 TEST=Manually on device together with Android side CL. On fresh device go through OptIn flow and set use location service off. Start Play Store and install Google Maps app. On start, Google Maps asks permission to activate usage of Location service. Disable and re-enable Arc and go throug OptIn flow but set this feature on and repeat Google Maps installation. On start, Google maps app does not ask permission to modify usage Location service. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/905787aa98feb38d969bcf03b0214a9d1a5a4c43 Cr-Commit-Position: refs/heads/master@{#407650}

Patch Set 1 #

Patch Set 2 : rebae #

Total comments: 22

Patch Set 3 : comments addressed #

Total comments: 1

Patch Set 4 : discard unwanted change #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+160 lines, -58 lines) Patch
M chrome/browser/chromeos/arc/arc_auth_service.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_auth_service.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_settings_service.cc View 12 chunks +59 lines, -27 lines 3 comments Download
M chrome/browser/chromeos/arc/arc_support_host.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/arc/arc_support_host.cc View 6 chunks +22 lines, -0 lines 0 comments Download
M chrome/browser/resources/chromeos/arc_support/background.js View 1 2 6 chunks +27 lines, -3 lines 0 comments Download
M chrome/browser/resources/chromeos/arc_support/main.css View 1 2 6 chunks +24 lines, -19 lines 0 comments Download
M chrome/browser/resources/chromeos/arc_support/main.html View 1 2 1 chunk +18 lines, -9 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (7 generated)
khmel
Hi Xiyuan, PTAL https://codereview.chromium.org/2179803002/diff/20001/chrome/browser/chromeos/arc/arc_settings_service.cc File chrome/browser/chromeos/arc/arc_settings_service.cc (right): https://codereview.chromium.org/2179803002/diff/20001/chrome/browser/chromeos/arc/arc_settings_service.cc#newcode211 chrome/browser/chromeos/arc/arc_settings_service.cc:211: void ArcSettingsServiceImpl::SyncInitialSettings() const { We have ...
4 years, 5 months ago (2016-07-25 15:36:05 UTC) #3
xiyuan
https://codereview.chromium.org/2179803002/diff/20001/chrome/browser/chromeos/arc/arc_settings_service.cc File chrome/browser/chromeos/arc/arc_settings_service.cc (right): https://codereview.chromium.org/2179803002/diff/20001/chrome/browser/chromeos/arc/arc_settings_service.cc#newcode211 chrome/browser/chromeos/arc/arc_settings_service.cc:211: void ArcSettingsServiceImpl::SyncInitialSettings() const { On 2016/07/25 15:36:05, khmel wrote: ...
4 years, 5 months ago (2016-07-25 18:03:40 UTC) #4
khmel
Thanks Xiyuan for comments. PTAL https://codereview.chromium.org/2179803002/diff/20001/chrome/browser/resources/chromeos/arc_support/background.js File chrome/browser/resources/chromeos/arc_support/background.js (right): https://codereview.chromium.org/2179803002/diff/20001/chrome/browser/resources/chromeos/arc_support/background.js#newcode496 chrome/browser/resources/chromeos/arc_support/background.js:496: sendNativeMessage('setLocationService', { On 2016/07/25 ...
4 years, 5 months ago (2016-07-25 22:48:48 UTC) #5
xiyuan
lgtm
4 years, 5 months ago (2016-07-25 22:55:06 UTC) #6
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/2179803002/60001
4 years, 5 months ago (2016-07-25 23:24:01 UTC) #8
commit-bot: I haz the power
Failed to apply the patch.
4 years, 5 months ago (2016-07-26 00:34:22 UTC) #11
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/905787aa98feb38d969bcf03b0214a9d1a5a4c43 Cr-Commit-Position: refs/heads/master@{#407650}
4 years, 5 months ago (2016-07-26 00:34:56 UTC) #13
Sergey Poromov
https://codereview.chromium.org/2179803002/diff/60001/chrome/browser/chromeos/arc/arc_settings_service.cc File chrome/browser/chromeos/arc/arc_settings_service.cc (left): https://codereview.chromium.org/2179803002/diff/60001/chrome/browser/chromeos/arc/arc_settings_service.cc#oldcode221 chrome/browser/chromeos/arc/arc_settings_service.cc:221: SyncBackupEnabled(); Looks like because of removing these lines, backup ...
4 years, 4 months ago (2016-08-02 15:20:41 UTC) #15
khmel
https://codereview.chromium.org/2179803002/diff/60001/chrome/browser/chromeos/arc/arc_settings_service.cc File chrome/browser/chromeos/arc/arc_settings_service.cc (left): https://codereview.chromium.org/2179803002/diff/60001/chrome/browser/chromeos/arc/arc_settings_service.cc#oldcode221 chrome/browser/chromeos/arc/arc_settings_service.cc:221: SyncBackupEnabled(); On 2016/08/02 15:20:41, Sergey Poromov wrote: > Looks ...
4 years, 4 months ago (2016-08-02 16:22:45 UTC) #16
Sergey Poromov
https://codereview.chromium.org/2179803002/diff/60001/chrome/browser/chromeos/arc/arc_settings_service.cc File chrome/browser/chromeos/arc/arc_settings_service.cc (left): https://codereview.chromium.org/2179803002/diff/60001/chrome/browser/chromeos/arc/arc_settings_service.cc#oldcode221 chrome/browser/chromeos/arc/arc_settings_service.cc:221: SyncBackupEnabled(); On 2016/08/02 16:22:44, khmel wrote: > On 2016/08/02 ...
4 years, 4 months ago (2016-08-02 17:43:49 UTC) #17
Sergey Poromov
4 years, 4 months ago (2016-08-02 17:43:50 UTC) #18
khmel
On 2016/08/02 17:43:49, Sergey Poromov wrote: > https://codereview.chromium.org/2179803002/diff/60001/chrome/browser/chromeos/arc/arc_settings_service.cc > File chrome/browser/chromeos/arc/arc_settings_service.cc (left): > > https://codereview.chromium.org/2179803002/diff/60001/chrome/browser/chromeos/arc/arc_settings_service.cc#oldcode221 ...
4 years, 4 months ago (2016-08-02 17:47:34 UTC) #19
Sergey Poromov
On 2016/08/02 17:47:34, khmel wrote: > On 2016/08/02 17:43:49, Sergey Poromov wrote: > > > ...
4 years, 4 months ago (2016-08-02 17:59:21 UTC) #20
khmel
On 2016/08/02 17:59:21, Sergey Poromov wrote: > On 2016/08/02 17:47:34, khmel wrote: > > On ...
4 years, 4 months ago (2016-08-02 18:13:08 UTC) #21
bartfab (slow)
4 years, 4 months ago (2016-08-03 09:09:08 UTC) #22
Message was sent while issue was closed.
On 2016/08/02 18:13:08, khmel wrote:
> On 2016/08/02 17:59:21, Sergey Poromov wrote:
> > On 2016/08/02 17:47:34, khmel wrote:
> > > On 2016/08/02 17:43:49, Sergey Poromov wrote:
> > > >
> > >
> >
>
https://codereview.chromium.org/2179803002/diff/60001/chrome/browser/chromeos...
> > > > File chrome/browser/chromeos/arc/arc_settings_service.cc (left):
> > > > 
> > > >
> > >
> >
>
https://codereview.chromium.org/2179803002/diff/60001/chrome/browser/chromeos...
> > > > chrome/browser/chromeos/arc/arc_settings_service.cc:221:
> > SyncBackupEnabled();
> > > > On 2016/08/02 16:22:44, khmel wrote:
> > > > > On 2016/08/02 15:20:41, Sergey Poromov wrote:
> > > > > > Looks like because of removing these lines, backup pref won't be
> synced
> > > when
> > > > > > changed because of policy change.
> > > > > > Please, revert these lines.
> > > > > 
> > > > > This code does not make sense. kArcBackupRestoreEnabled is local pref
> and
> > > can
> > > > be
> > > > > changed during Arc OptIn flow (and it is true by default). Even if it
> has
> > > been
> > > > > changed in OptIn Arc is not started at this moment and IPC message is
> not
> > > > > delivered.
> > > > > 
> > > > > Please see SyncInitialSettings for backup fix.
> > > > 
> > > > What if the pref changes after OptIn, because of policy change? How
should
> > we
> > > > transmit the change to Android side?
> > > 
> > > Do we expect this? As I understand policy can be changed on Android side,
> not
> > on
> > > Chrome side. On Chrome we don't expose any interface for changing this.
Also
> > > consider situation when user change B&R on Android. We don't have
> > bi-directional
> > > sync for this case. Based on this this option is applied only on Android
> first
> > > run.
> > 
> > Policy is controlled on Chrome side: http://crrev.com/2127113002
> > We don't need to transfer and sync the setting from Android side, as any
> change
> > that comes from Chrome side overrides it. There are two ways:
> > 1) User set/unset checkbox on OptIn - it transfers to Android side
immediately
> > on start.
> > 2) Policy changes to control B&R (on or off) - it should be transferred with
> > "managed"=true, Android will disable ability to change it from Android
> setting.
> > 
> > First case already works after this change. For second I assume that
> > OnPrefChanged() will be called here as kArcBackupRestoreEnabled is observed
by
> > registrar.
> 
> For second case I will create additional CL that handle changes (for B&R and
> Location services) in prefs (just to confirm that local prefs are ok to be
> controlled by policy. Or we need to declare it synced?). Could you please also
> check if we need to make Location Services also controlled by policy. Also
> solution for this is not just un-commenting 2 lines to handle pref changes.
> There is the case when pref can be changed when Arc is not available. In this
> case pref change notification will be discarded. Reapplying it each time on
Arc
> boot is also not good because it may override Android settings (in case it is
> not manageable). I created bug for this: b/30595172. Please note that we also
> need to update OptIn UI in this case and this is requires legacy team approval
> and mocks.

Yes, local prefs are sufficient for policy control. They do not need to be
synced.

I e-mailed you and Philipp, who is working on bringing policy control to the
opt-in screen. It is best if you sync up to avoid any duplicate work.

Powered by Google App Engine
This is Rietveld 408576698