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 5464da6b141df89db038e559c9b4df7f37f513e1..cc5e17cc7d7f27b9a8678b90389ef88274bbd1c8 100644 |
--- a/google_apis/gaia/gaia_auth_util.cc |
+++ b/google_apis/gaia/gaia_auth_util.cc |
@@ -21,9 +21,8 @@ const char kGooglemailDomain[] = "googlemail.com"; |
std::string CanonicalizeEmailImpl(const std::string& email_address, |
bool change_googlemail_to_gmail) { |
- std::vector<std::string> parts; |
- char at = '@'; |
- base::SplitString(email_address, at, &parts); |
+ std::vector<std::string> parts = base::SplitString( |
+ email_address, "@", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
if (parts.size() != 2U) { |
NOTREACHED() << "expecting exactly one @, but got " |
<< (parts.empty() ? 0 : parts.size() - 1) |