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

Unified Diff: components/user_manager/user_names.cc

Issue 2452983002: ChromeOS: This CL moves chromeos/login/user_names* to user_mananger. (Closed)
Patch Set: Removed unused #includes Created 4 years, 2 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 | « components/user_manager/user_names.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_manager/user_names.cc
diff --git a/chromeos/login/user_names.cc b/components/user_manager/user_names.cc
similarity index 87%
rename from chromeos/login/user_names.cc
rename to components/user_manager/user_names.cc
index 32c23dec77c0a5eb1aaf86be4e4787c3b9342221..a7cd67b16ffc565d2db87e5cb77006a6a8834576 100644
--- a/chromeos/login/user_names.cc
+++ b/components/user_manager/user_names.cc
@@ -1,7 +1,7 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chromeos/login/user_names.h"
+#include "components/user_manager/user_names.h"
#include "base/macros.h"
#include "base/memory/singleton.h"
@@ -45,17 +45,14 @@ class FixedAccountManager {
};
FixedAccountManager::FixedAccountManager()
- : stub_account_id_(AccountId::FromUserEmail(chromeos::login::kStubUser)),
+ : stub_account_id_(AccountId::FromUserEmail(user_manager::kStubUser)),
signin_account_id_(AccountId::FromUserEmail(kSignInUser)),
- guest_account_id_(
- AccountId::FromUserEmail(chromeos::login::kGuestUserName)),
+ guest_account_id_(AccountId::FromUserEmail(user_manager::kGuestUserName)),
demo_account_id_(AccountId::FromUserEmail(kDemoUserName)) {}
} // namespace
-namespace chromeos {
-
-namespace login {
+namespace user_manager {
constexpr const char kStubUser[] = "stub-user@example.com";
@@ -65,7 +62,7 @@ constexpr const char kGuestUserName[] = "$guest";
constexpr const char kSupervisedUserDomain[] = "locally-managed.localhost";
std::string CanonicalizeUserID(const std::string& user_id) {
- if (user_id == chromeos::login::kGuestUserName)
+ if (user_id == kGuestUserName)
return user_id;
return gaia::CanonicalizeEmail(user_id);
}
@@ -86,6 +83,4 @@ const AccountId& DemoAccountId() {
return FixedAccountManager::GetInstance()->demo_account_id();
}
-} // namespace login
-
-} // namespace chromeos
+} // namespace user_manager
« no previous file with comments | « components/user_manager/user_names.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698