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

Unified Diff: chrome/browser/ui/search/search_tab_helper.cc

Issue 886233003: [Search] Identity check for New Tab Page should use canonicalized form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2272
Patch Set: Created 5 years, 11 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/ui/search/search_tab_helper.cc
diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc
index b610cee66d12737eae90c302ed706a810bbaeaf9..36cf06ab2574a708896411e0a5c5eafab697c13b 100644
--- a/chrome/browser/ui/search/search_tab_helper.cc
+++ b/chrome/browser/ui/search/search_tab_helper.cc
@@ -46,6 +46,7 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/referrer.h"
+#include "google_apis/gaia/gaia_auth_util.h"
#include "net/base/net_errors.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/page_transition_types.h"
@@ -563,9 +564,9 @@ void SearchTabHelper::PasteIntoOmnibox(const base::string16& text) {
void SearchTabHelper::OnChromeIdentityCheck(const base::string16& identity) {
SigninManagerBase* manager = SigninManagerFactory::GetForProfile(profile());
if (manager) {
- const base::string16 username =
- base::UTF8ToUTF16(manager->GetAuthenticatedUsername());
- ipc_router_.SendChromeIdentityCheckResult(identity, identity == username);
+ ipc_router_.SendChromeIdentityCheckResult(
+ identity, gaia::AreEmailsSame(base::UTF16ToUTF8(identity),
+ manager->GetAuthenticatedUsername()));
} else {
ipc_router_.SendChromeIdentityCheckResult(identity, false);
}
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper.h ('k') | chrome/browser/ui/search/search_tab_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698