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

Unified Diff: chrome/browser/chromeos/login/google_authenticator.cc

Issue 3436031: [Chrome OS] Refactor Canonicalize() method into base class to prepare for new Authenticator subclass (Closed)
Patch Set: aaaaand fix one more header Created 10 years, 3 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: chrome/browser/chromeos/login/google_authenticator.cc
diff --git a/chrome/browser/chromeos/login/google_authenticator.cc b/chrome/browser/chromeos/login/google_authenticator.cc
index d1b23d5e76000aebd9eaf5eb60b6184b3b9e57ce..f6e53b47b079463699165abc50556e95ae0e4e9e 100644
--- a/chrome/browser/chromeos/login/google_authenticator.cc
+++ b/chrome/browser/chromeos/login/google_authenticator.cc
@@ -13,7 +13,6 @@
#include "base/logging.h"
#include "base/path_service.h"
#include "base/sha2.h"
-#include "base/string_split.h"
#include "base/string_util.h"
#include "base/third_party/nss/blapi.h"
#include "base/third_party/nss/sha256.h"
@@ -435,19 +434,4 @@ bool GoogleAuthenticator::BinaryToHex(const std::vector<unsigned char>& binary,
return true;
}
-// static
-std::string GoogleAuthenticator::Canonicalize(
- const std::string& email_address) {
- std::vector<std::string> parts;
- char at = '@';
- SplitString(email_address, at, &parts);
- DCHECK_EQ(parts.size(), 2U) << "email_address should have only one @";
- RemoveChars(parts[0], ".", &parts[0]);
- if (parts[0].find('+') != std::string::npos)
- parts[0].erase(parts[0].find('+'));
- std::string new_email = StringToLowerASCII(JoinString(parts, at));
- LOG(INFO) << "Canonicalized " << email_address << " to " << new_email;
- return new_email;
-}
-
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698