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

Unified Diff: chrome/browser/ui/ash/session_controller_client.cc

Issue 2617763003: Add a mojo interface for AccountId (Closed)
Patch Set: allow UNKNOWN account type Created 3 years, 11 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
Index: chrome/browser/ui/ash/session_controller_client.cc
diff --git a/chrome/browser/ui/ash/session_controller_client.cc b/chrome/browser/ui/ash/session_controller_client.cc
index 372cf906f3ca0634b9c86179b8543580e83758f2..d0c78e51a0064dcc4fa4511556c852838a1f8f6b 100644
--- a/chrome/browser/ui/ash/session_controller_client.cc
+++ b/chrome/browser/ui/ash/session_controller_client.cc
@@ -55,8 +55,7 @@ ash::mojom::UserSessionPtr UserToUserSession(const User& user) {
ash::mojom::UserSessionPtr session = ash::mojom::UserSession::New();
session->session_id = GetSessionId(&user);
session->type = user.GetType();
- // TODO(xiyuan): Add type map for AccountId.
- session->serialized_account_id = user.GetAccountId().Serialize();
+ session->account_id = user.GetAccountId();
session->display_name = base::UTF16ToUTF8(user.display_name());
session->display_email = user.display_email();
@@ -104,15 +103,7 @@ void SessionControllerClient::RequestLockScreen() {
DoLockScreen();
}
-void SessionControllerClient::SwitchActiveUser(
- const std::string& serialized_account_id) {
- // TODO(xiyuan): Add type map for AccountId.
- AccountId account_id(EmptyAccountId());
- if (!AccountId::Deserialize(serialized_account_id, &account_id)) {
- LOG(ERROR) << "Bad account id for SwitchActiveUser.";
- return;
- }
-
+void SessionControllerClient::SwitchActiveUser(const AccountId& account_id) {
DoSwitchActiveUser(account_id);
}

Powered by Google App Engine
This is Rietveld 408576698