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

Unified Diff: tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py

Issue 59353002: Replace dependance on /home/chronos/user with cryptohome-path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@multi
Patch Set: rebase Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py
diff --git a/tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py b/tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py
index 0c065a5bb41cd2688e92d3a47cfa74322b35bad5..4416e90fd98babe0128966fc79d4bea6ddadc35f 100644
--- a/tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py
+++ b/tools/telemetry/telemetry/core/backends/chrome/cros_browser_backend.py
@@ -310,9 +310,15 @@ class CrOSBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
}
''')
+ def _CryptohomePath(self, user):
+ (path, _) = self._cri.RunCmdOnDevice(['cryptohome-path', 'user',
+ "'%s'" % user])
+ return path
+
def _IsCryptohomeMounted(self):
- """Returns True if a cryptohome vault is mounted at /home/chronos/user."""
- return self._cri.FilesystemMountedAt('/home/chronos/user').startswith(
+ """Returns True if a cryptohome vault at the user mount point."""
+ profile_path = self._CryptohomePath(self._username)
+ return self._cri.FilesystemMountedAt(profile_path).startswith(
'/home/.shadow/')
def _HandleUserImageSelectionScreen(self):
@@ -374,8 +380,9 @@ class CrOSBrowserBackend(chrome_browser_backend.ChromeBrowserBackend):
pass
def _WaitForGuestFsMounted(self):
- """Waits for /home/chronos/user to be mounted as guestfs"""
- util.WaitFor(lambda: (self._cri.FilesystemMountedAt('/home/chronos/user') ==
+ """Waits for the guest user to be mounted as guestfs"""
+ guest_path = self._CryptohomePath('$guest')
+ util.WaitFor(lambda: (self._cri.FilesystemMountedAt(guest_path) ==
'guestfs'), 20)
def _NavigateGuestLogin(self):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698