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

Unified Diff: chrome/browser/ui/webui/options/chromeos/user_image_source.cc

Issue 1454153002: Revert of This CL replaces e-mail with AccountId on user selection screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/webui/chromeos/login/user_board_screen_handler.cc ('k') | components/login.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/chromeos/user_image_source.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/user_image_source.cc b/chrome/browser/ui/webui/options/chromeos/user_image_source.cc
index 36ffb10587ba895c5e42b4f7c76a91910dfe74e8..46572be08236c9d265a510e8e475c0b36b77b505 100644
--- a/chrome/browser/ui/webui/options/chromeos/user_image_source.cc
+++ b/chrome/browser/ui/webui/options/chromeos/user_image_source.cc
@@ -21,24 +21,14 @@
namespace {
// Parses the user image URL, which looks like
-// "chrome://userimage/serialized-user-id?key1=value1&...&key_n=value_n",
+// "chrome://userimage/user@host?key1=value1&...&key_n=value_n",
// to user email.
void ParseRequest(const GURL& url,
std::string* email) {
DCHECK(url.is_valid());
- const std::string serialized_account_id = net::UnescapeURLComponent(
- url.path().substr(1),
- (net::UnescapeRule::URL_SPECIAL_CHARS | net::UnescapeRule::SPACES));
- AccountId account_id(EmptyAccountId());
- const bool status =
- AccountId::Deserialize(serialized_account_id, &account_id);
- // TODO(alemate): DCHECK(status) - should happen after options page is
- // migrated.
- if (!status) {
- LOG(WARNING) << "Failed to deserialize '" << serialized_account_id << "'";
- account_id = AccountId::FromUserEmail(serialized_account_id);
- }
- *email = account_id.GetUserEmail();
+ *email = net::UnescapeURLComponent(url.path().substr(1),
+ (net::UnescapeRule::URL_SPECIAL_CHARS |
+ net::UnescapeRule::SPACES));
}
} // namespace
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.cc ('k') | components/login.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698