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

Unified Diff: chromeos/dbus/cryptohome_client.cc

Issue 14581006: [cros mp] Load profiles from /home/chronos/u-[$hash], add GetUserIdHashFromProfile() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 7 months 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 | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/cryptohome_client.cc
diff --git a/chromeos/dbus/cryptohome_client.cc b/chromeos/dbus/cryptohome_client.cc
index 286533d4278f9e885ca7cd6894f952fd7c23b1c9..dc4486da62863e775ea32018f05c366c24d9a01b 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));
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698