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

Unified Diff: google_apis/gaia/gaia_auth_util.cc

Issue 143183007: Update policy signature verification to include policy domain. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed style error. Created 6 years, 10 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: google_apis/gaia/gaia_auth_util.cc
diff --git a/google_apis/gaia/gaia_auth_util.cc b/google_apis/gaia/gaia_auth_util.cc
index 3aabd0770972b769328d7c324c13bdbbfdaf0a6c..8c48e38c6e0d56d494119dd4c2244301f9bfa310 100644
--- a/google_apis/gaia/gaia_auth_util.cc
+++ b/google_apis/gaia/gaia_auth_util.cc
@@ -22,10 +22,12 @@ std::string CanonicalizeEmail(const std::string& email_address) {
std::vector<std::string> parts;
char at = '@';
base::SplitString(email_address, at, &parts);
- if (parts.size() != 2U)
- NOTREACHED() << "expecting exactly one @, but got " << parts.size();
- else if (parts[1] == kGmailDomain) // only strip '.' for gmail accounts.
+ if (parts.size() != 2U) {
+ NOTREACHED() << "expecting exactly one @, but got " << parts.size()-1 <<
+ " : " << email_address;
+ } else if (parts[1] == kGmailDomain) { // only strip '.' for gmail accounts.
base::RemoveChars(parts[0], ".", &parts[0]);
+ }
std::string new_email = StringToLowerASCII(JoinString(parts, at));
VLOG(1) << "Canonicalized " << email_address << " to " << new_email;
return new_email;

Powered by Google App Engine
This is Rietveld 408576698