Index: chromeos/dbus/cryptohome_client.cc |
diff --git a/chromeos/dbus/cryptohome_client.cc b/chromeos/dbus/cryptohome_client.cc |
index d1f4804d7efdb0cc4af88e1107b4f110781f3cf9..c05ff7c51ac97b801948c0923b0d4ac9bbeae0c1 100644 |
--- a/chromeos/dbus/cryptohome_client.cc |
+++ b/chromeos/dbus/cryptohome_client.cc |
@@ -858,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 + kUserIdStubHashSuffix; |
+ std::string sanitized_username = GetStubSanitizedUsername(username); |
MessageLoop::current()->PostTask( |
FROM_HERE, |
base::Bind(callback, DBUS_METHOD_CALL_SUCCESS, sanitized_username)); |
@@ -1198,4 +1198,10 @@ CryptohomeClient* CryptohomeClient::Create(DBusClientImplementationType type, |
return new CryptohomeClientStubImpl(); |
} |
+// static |
+std::string CryptohomeClient::GetStubSanitizedUsername( |
+ const std::string& username) { |
+ return username + kUserIdStubHashSuffix; |
+} |
+ |
} // namespace chromeos |