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 46572be08236c9d265a510e8e475c0b36b77b505..a2918c04d9bfb336d990d6f9974d051951f58f4f 100644 |
--- a/chrome/browser/ui/webui/options/chromeos/user_image_source.cc |
+++ b/chrome/browser/ui/webui/options/chromeos/user_image_source.cc |
@@ -26,9 +26,18 @@ namespace { |
void ParseRequest(const GURL& url, |
std::string* email) { |
DCHECK(url.is_valid()); |
- *email = net::UnescapeURLComponent(url.path().substr(1), |
- (net::UnescapeRule::URL_SPECIAL_CHARS | |
- net::UnescapeRule::SPACES)); |
+ const std::string user_id = net::UnescapeURLComponent( |
stevenjb
2015/11/11 20:39:23
s/user_id/serialized_account_id/
Alexander Alekseev
2015/11/12 06:53:04
Done.
|
+ url.path().substr(1), |
+ (net::UnescapeRule::URL_SPECIAL_CHARS | net::UnescapeRule::SPACES)); |
+ AccountId account_id(EmptyAccountId()); |
+ const bool status = AccountId::Deserialize(user_id, &account_id); |
+ // TODO(alemate): DCHECK(status) - should happen after options page is |
+ // migrated. |
+ if (!status) { |
+ LOG(WARNING) << "Failed to deserialize '" << user_id << "'"; |
dzhioev (left Google)
2015/11/12 00:46:24
I believe we shouldn't produce this warning, as lo
Alexander Alekseev
2015/11/12 06:53:04
I don't think we should support other ID formats f
|
+ account_id = AccountId::FromUserEmail(user_id); |
+ } |
+ *email = account_id.GetUserEmail(); |
} |
} // namespace |