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

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

Issue 2617763003: Add a mojo interface for AccountId (Closed)
Patch Set: rebase 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
« no previous file with comments | « chrome/browser/ui/ash/session_controller_client.h ('k') | components/signin/core/account_id/account_id.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fad60d44bd2d2948fd93239636db007fd33bbb8a..e502ee539a132cefd89fee4a1f03ca2a07cbd6c2 100644
--- a/chrome/browser/ui/ash/session_controller_client.cc
+++ b/chrome/browser/ui/ash/session_controller_client.cc
@@ -53,8 +53,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();
@@ -102,15 +101,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);
}
« no previous file with comments | « chrome/browser/ui/ash/session_controller_client.h ('k') | components/signin/core/account_id/account_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698