From 847522f9fc1e134417e8bc87af9ab20cb3e7f123 Mon Sep 17 00:00:00 2001 From: "nkostylev@chromium.org" Date: Fri, 10 May 2013 09:32:42 +0000 Subject: [cros mp] Load profiles from /home/chronos/u-[$hash], add GetUserIdHashFromProfile() * KioskTest.InstallAndLaunchApp will fail when --multi-profiles switch is passed. Kiosk MP auth flow support is tracked at http://crbug.com/238985 BUG=238623,229411 TBR=pneubeck Review URL: https://chromiumcodereview.appspot.com/14581006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199434 0039d316-1c4b-4281-b951-d872f2087c98 --- chromeos/dbus/cryptohome_client.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'chromeos/dbus/cryptohome_client.cc') diff --git a/chromeos/dbus/cryptohome_client.cc b/chromeos/dbus/cryptohome_client.cc index 286533d..dc4486d 100644 --- a/chromeos/dbus/cryptohome_client.cc +++ b/chromeos/dbus/cryptohome_client.cc @@ -18,6 +18,10 @@ namespace chromeos { namespace { +// This suffix is appended to user_id to get hash in stub implementation: +// stub_hash = "[user_id]-hash"; +static const char kUserIdStubHashSuffix[] = "-hash"; + // The CryptohomeClient implementation. class CryptohomeClientImpl : public CryptohomeClient { public: @@ -854,7 +858,7 @@ class CryptohomeClientStubImpl : public CryptohomeClient { const StringDBusMethodCallback& callback) OVERRIDE { // Even for stub implementation we have to return different values // so that multi-profiles would work. - std::string sanitized_username = username + "-profile"; + std::string sanitized_username = username + kUserIdStubHashSuffix; MessageLoop::current()->PostTask( FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS, sanitized_username)); -- cgit v1.1