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

Side by Side Diff: components/user_manager/user_names.cc

Issue 2916823002: Move Mus into chrome's process when running with --mus.
Patch Set: Addressing most feedback, making this work on device. Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 #include "components/user_manager/user_names.h" 4 #include "components/user_manager/user_names.h"
5 5
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "components/signin/core/account_id/account_id.h" 8 #include "components/signin/core/account_id/account_id.h"
9 #include "google_apis/gaia/gaia_auth_util.h" 9 #include "google_apis/gaia/gaia_auth_util.h"
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 FixedAccountManager::FixedAccountManager() 47 FixedAccountManager::FixedAccountManager()
48 : stub_account_id_(AccountId::FromUserEmail(user_manager::kStubUser)), 48 : stub_account_id_(AccountId::FromUserEmail(user_manager::kStubUser)),
49 signin_account_id_(AccountId::FromUserEmail(kSignInUser)), 49 signin_account_id_(AccountId::FromUserEmail(kSignInUser)),
50 guest_account_id_(AccountId::FromUserEmail(user_manager::kGuestUserName)), 50 guest_account_id_(AccountId::FromUserEmail(user_manager::kGuestUserName)),
51 demo_account_id_(AccountId::FromUserEmail(kDemoUserName)) {} 51 demo_account_id_(AccountId::FromUserEmail(kDemoUserName)) {}
52 52
53 } // namespace 53 } // namespace
54 54
55 namespace user_manager { 55 namespace user_manager {
56 56
57 const char kStubUser[] = "stub-user@example.com"; 57 const char kStubUser[] = "stub-user@consumer.example.com";
58 58
59 // Should match cros constant in platform/libchromeos/chromeos/cryptohome.h 59 // Should match cros constant in platform/libchromeos/chromeos/cryptohome.h
60 const char kGuestUserName[] = "$guest"; 60 const char kGuestUserName[] = "$guest";
61 61
62 const char kSupervisedUserDomain[] = "locally-managed.localhost"; 62 const char kSupervisedUserDomain[] = "locally-managed.localhost";
63 63
64 std::string CanonicalizeUserID(const std::string& user_id) { 64 std::string CanonicalizeUserID(const std::string& user_id) {
65 if (user_id == kGuestUserName) 65 if (user_id == kGuestUserName)
66 return user_id; 66 return user_id;
67 return gaia::CanonicalizeEmail(user_id); 67 return gaia::CanonicalizeEmail(user_id);
(...skipping 10 matching lines...) Expand all
78 78
79 const AccountId& GuestAccountId() { 79 const AccountId& GuestAccountId() {
80 return FixedAccountManager::GetInstance()->guest_account_id(); 80 return FixedAccountManager::GetInstance()->guest_account_id();
81 } 81 }
82 82
83 const AccountId& DemoAccountId() { 83 const AccountId& DemoAccountId() {
84 return FixedAccountManager::GetInstance()->demo_account_id(); 84 return FixedAccountManager::GetInstance()->demo_account_id();
85 } 85 }
86 86
87 } // namespace user_manager 87 } // namespace user_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698