New issue
Advanced search Search tips

Issue 827368 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 812039



Sign in to add a comment

[Demo mode] Cleanup support for 'bought' devices

Project Member Reported by agawronska@chromium.org, Mar 29 2018

Issue description

This will implement our cleanup agent which will ensure that a user that has ‘bought’ the device is not negatively impacted by the apps that we ship with the device
 
Summary: [Demo mode] Cleanup support for 'bought' devices (was: [Demo mode] Cleanup support)
Labels: M-70 OS-Chrome
Status: Available (was: Untriaged)
This only affects devices that FSI with demo mode resources (which will likely have an update ready by the time they're owned), and dedicated retail demo devices that are reimaged for demo mode (which probably won't be sold), so it seems reasonable to push to M70 if we can't get to this before the branch.
Blocking: 812039
Cc: tbarzic@chromium.org
Since we're using a CrOS Component for demo mode resources, this applies to both online and offline enrollment. We will need to delete the component eventually.
Owner: tbarzic@chromium.org
Status: Started (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d6bbb56c26abc16cf9b232d14556cdac9bc4a426

commit d6bbb56c26abc16cf9b232d14556cdac9bc4a426
Author: Toni Barzic <tbarzic@google.com>
Date: Fri Aug 17 06:20:04 2018

Remove pre-installed demo mode resources on low disk space

Introduces a class that will handle removing pre-installed demo mode
resources when needed.
First incarnation observes low disk space signal from cryptohome
service, and removes pre-installed resources when low space is detected
(provided that the device is not in demo mode).
When demo mode resources get removed from disk, this is recorded in
local state, to avoid future attempts to remove these resources.

More logic for requesting demo mode resources removal to come.

BUG= 827368 

Change-Id: I721d1995fa818fc2fc1d056e33ba513380bf441e
Reviewed-on: https://chromium-review.googlesource.com/1173670
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: Alexander Alekseev <alemate@chromium.org>
Reviewed-by: Aga Wronska <agawronska@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583976}
[modify] https://crrev.com/d6bbb56c26abc16cf9b232d14556cdac9bc4a426/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/d6bbb56c26abc16cf9b232d14556cdac9bc4a426/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/d6bbb56c26abc16cf9b232d14556cdac9bc4a426/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[add] https://crrev.com/d6bbb56c26abc16cf9b232d14556cdac9bc4a426/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover.cc
[add] https://crrev.com/d6bbb56c26abc16cf9b232d14556cdac9bc4a426/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover.h
[add] https://crrev.com/d6bbb56c26abc16cf9b232d14556cdac9bc4a426/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover_unittest.cc
[modify] https://crrev.com/d6bbb56c26abc16cf9b232d14556cdac9bc4a426/chrome/browser/chromeos/login/demo_mode/demo_session.cc
[modify] https://crrev.com/d6bbb56c26abc16cf9b232d14556cdac9bc4a426/chrome/browser/chromeos/login/demo_mode/demo_session.h
[modify] https://crrev.com/d6bbb56c26abc16cf9b232d14556cdac9bc4a426/chrome/browser/prefs/browser_prefs.cc
[modify] https://crrev.com/d6bbb56c26abc16cf9b232d14556cdac9bc4a426/chromeos/dbus/fake_cryptohome_client.cc
[modify] https://crrev.com/d6bbb56c26abc16cf9b232d14556cdac9bc4a426/chromeos/dbus/fake_cryptohome_client.h
[modify] https://crrev.com/d6bbb56c26abc16cf9b232d14556cdac9bc4a426/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/d6bbb56c26abc16cf9b232d14556cdac9bc4a426/tools/metrics/histograms/histograms.xml

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a88599117618e9f07d72f4fac2b7b63a88177f9d

commit a88599117618e9f07d72f4fac2b7b63a88177f9d
Author: Findit <findit-for-me@appspot.gserviceaccount.com>
Date: Fri Aug 17 11:33:21 2018

Revert "Remove pre-installed demo mode resources on low disk space"

This reverts commit d6bbb56c26abc16cf9b232d14556cdac9bc4a426.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 583976 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2Q2YmJiNTZjMjZhYmMxNmNmOWIyMzJkMTQ1NTZjZGFjOWJjNGE0MjYM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium.memory/Linux%20Chromium%20OS%20ASan%20LSan%20Tests%20%281%29/28647

Sample Failed Step: unit_tests

Original change's description:
> Remove pre-installed demo mode resources on low disk space
> 
> Introduces a class that will handle removing pre-installed demo mode
> resources when needed.
> First incarnation observes low disk space signal from cryptohome
> service, and removes pre-installed resources when low space is detected
> (provided that the device is not in demo mode).
> When demo mode resources get removed from disk, this is recorded in
> local state, to avoid future attempts to remove these resources.
> 
> More logic for requesting demo mode resources removal to come.
> 
> BUG= 827368 
> 
> Change-Id: I721d1995fa818fc2fc1d056e33ba513380bf441e
> Reviewed-on: https://chromium-review.googlesource.com/1173670
> Commit-Queue: Toni Baržić <tbarzic@chromium.org>
> Reviewed-by: Alexander Alekseev <alemate@chromium.org>
> Reviewed-by: Aga Wronska <agawronska@chromium.org>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Ilya Sherman <isherman@chromium.org>
> Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#583976}

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
BUG= 827368 

Change-Id: Ib4fb21229e8be9894bff6d22c1fa4d7c894c1e2a
Reviewed-on: https://chromium-review.googlesource.com/1179781
Cr-Commit-Position: refs/heads/master@{#584021}
[modify] https://crrev.com/a88599117618e9f07d72f4fac2b7b63a88177f9d/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/a88599117618e9f07d72f4fac2b7b63a88177f9d/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/a88599117618e9f07d72f4fac2b7b63a88177f9d/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[delete] https://crrev.com/7bc01f1ffb9f4affc67d10ed5c3c3691fe519078/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover.cc
[delete] https://crrev.com/7bc01f1ffb9f4affc67d10ed5c3c3691fe519078/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover.h
[delete] https://crrev.com/7bc01f1ffb9f4affc67d10ed5c3c3691fe519078/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover_unittest.cc
[modify] https://crrev.com/a88599117618e9f07d72f4fac2b7b63a88177f9d/chrome/browser/chromeos/login/demo_mode/demo_session.cc
[modify] https://crrev.com/a88599117618e9f07d72f4fac2b7b63a88177f9d/chrome/browser/chromeos/login/demo_mode/demo_session.h
[modify] https://crrev.com/a88599117618e9f07d72f4fac2b7b63a88177f9d/chrome/browser/prefs/browser_prefs.cc
[modify] https://crrev.com/a88599117618e9f07d72f4fac2b7b63a88177f9d/chromeos/dbus/fake_cryptohome_client.cc
[modify] https://crrev.com/a88599117618e9f07d72f4fac2b7b63a88177f9d/chromeos/dbus/fake_cryptohome_client.h
[modify] https://crrev.com/a88599117618e9f07d72f4fac2b7b63a88177f9d/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/a88599117618e9f07d72f4fac2b7b63a88177f9d/tools/metrics/histograms/histograms.xml

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/75610ae72ce02d16f3bc17100972c290db26fcee

commit 75610ae72ce02d16f3bc17100972c290db26fcee
Author: Toni Barzic <tbarzic@google.com>
Date: Fri Aug 17 20:33:07 2018

Reland "Remove pre-installed demo mode resources on low disk space"

This is a reland of d6bbb56c26abc16cf9b232d14556cdac9bc4a426

Inheriting from the original cl (as the files for which these lgtms
were given have not changed)
TBR=isherman@chromium.org, alemate@chromium.org, gab@chromium.org

Original change's description:
> Remove pre-installed demo mode resources on low disk space
>
> Introduces a class that will handle removing pre-installed demo mode
> resources when needed.
> First incarnation observes low disk space signal from cryptohome
> service, and removes pre-installed resources when low space is detected
> (provided that the device is not in demo mode).
> When demo mode resources get removed from disk, this is recorded in
> local state, to avoid future attempts to remove these resources.
>
> More logic for requesting demo mode resources removal to come.
>
> BUG= 827368 
>
> Change-Id: I721d1995fa818fc2fc1d056e33ba513380bf441e
> Reviewed-on: https://chromium-review.googlesource.com/1173670
> Commit-Queue: Toni Baržić <tbarzic@chromium.org>
> Reviewed-by: Alexander Alekseev <alemate@chromium.org>
> Reviewed-by: Aga Wronska <agawronska@chromium.org>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Ilya Sherman <isherman@chromium.org>
> Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#583976}

Bug:  827368 
Change-Id: Idd8f42f1f85d8ed0eccd17a342750a4a1150e679
Reviewed-on: https://chromium-review.googlesource.com/1180041
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584179}
[modify] https://crrev.com/75610ae72ce02d16f3bc17100972c290db26fcee/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/75610ae72ce02d16f3bc17100972c290db26fcee/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/75610ae72ce02d16f3bc17100972c290db26fcee/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[add] https://crrev.com/75610ae72ce02d16f3bc17100972c290db26fcee/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover.cc
[add] https://crrev.com/75610ae72ce02d16f3bc17100972c290db26fcee/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover.h
[add] https://crrev.com/75610ae72ce02d16f3bc17100972c290db26fcee/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover_unittest.cc
[modify] https://crrev.com/75610ae72ce02d16f3bc17100972c290db26fcee/chrome/browser/chromeos/login/demo_mode/demo_session.cc
[modify] https://crrev.com/75610ae72ce02d16f3bc17100972c290db26fcee/chrome/browser/chromeos/login/demo_mode/demo_session.h
[modify] https://crrev.com/75610ae72ce02d16f3bc17100972c290db26fcee/chrome/browser/prefs/browser_prefs.cc
[modify] https://crrev.com/75610ae72ce02d16f3bc17100972c290db26fcee/chromeos/dbus/fake_cryptohome_client.cc
[modify] https://crrev.com/75610ae72ce02d16f3bc17100972c290db26fcee/chromeos/dbus/fake_cryptohome_client.h
[modify] https://crrev.com/75610ae72ce02d16f3bc17100972c290db26fcee/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/75610ae72ce02d16f3bc17100972c290db26fcee/tools/metrics/histograms/histograms.xml

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/26a6b0bb506a86c2db3cb231e389694614050d0a

commit 26a6b0bb506a86c2db3cb231e389694614050d0a
Author: Toni Barzic <tbarzic@google.com>
Date: Fri Aug 17 22:33:35 2018

Remove demo mode resources when a user logs in on a managed device

Device getting enterprise enrolled, and then used should be a good
signal that demo mode resources are no longer needed.

An exception is made for demo mode implemented through public sessions
(as it's the case today) - in that case retailer might attempt to swich
to the revamped demo mode sessions, so might need the resources after
all.

BUG= 827368 

Change-Id: Ia5645b059050f9d7858ba34acd84201969b88b71
Reviewed-on: https://chromium-review.googlesource.com/1176652
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584222}
[modify] https://crrev.com/26a6b0bb506a86c2db3cb231e389694614050d0a/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover.cc
[modify] https://crrev.com/26a6b0bb506a86c2db3cb231e389694614050d0a/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover.h
[modify] https://crrev.com/26a6b0bb506a86c2db3cb231e389694614050d0a/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover_unittest.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Aug 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a999290e1cc611ae7745c5292e17491cd8fa0144

commit a999290e1cc611ae7745c5292e17491cd8fa0144
Author: Toni Barzic <tbarzic@google.com>
Date: Mon Aug 20 04:48:44 2018

Remove demo mode resources after sufficient amount of user activity

Have DemoModeResourcesRemover keep track of amount of time the user is
interacting with the device (using UserActivityDetector), and once the
total amount of active usage is over 8 hours, attempt demo mode
resources removal - substantial amount of active usage should be a good
signal that the device has been owned by a real user.

BUG= 827368 
TEST=unittests

Change-Id: Ib7b90da7da41bdcebbead0f0239579e727f07ae8
Reviewed-on: https://chromium-review.googlesource.com/1180603
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584360}
[modify] https://crrev.com/a999290e1cc611ae7745c5292e17491cd8fa0144/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover.cc
[modify] https://crrev.com/a999290e1cc611ae7745c5292e17491cd8fa0144/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover.h
[modify] https://crrev.com/a999290e1cc611ae7745c5292e17491cd8fa0144/chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover_unittest.cc

Status: Fixed (was: Started)
We might adjust constants in  a999290e1cc611ae7745c5292e17491cd8fa0144, but otherwise I think this is done.

Sign in to add a comment