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

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

Issue 701973002: Separate checking the user identity and checking if the user is syncing his history in two differen… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 f2c34e773db558c7707628ad85ec8b24ad71e745..0952b6a157d2b6b6248a54cb0c1898e9e2e0466d 100644
--- a/chrome/browser/ui/search/search_tab_helper.cc
+++ b/chrome/browser/ui/search/search_tab_helper.cc
@@ -564,14 +564,15 @@ void SearchTabHelper::OnChromeIdentityCheck(const base::string16& identity) {
if (manager) {
const base::string16 username =
base::UTF8ToUTF16(manager->GetAuthenticatedUsername());
- // The identity check only passes if the user is syncing their history.
- // TODO(beaudoin): Change this function name and related APIs now that it's
- // checking both the identity and the user's sync state.
- bool matches = IsHistorySyncEnabled(profile()) && identity == username;
- ipc_router_.SendChromeIdentityCheckResult(identity, matches);
+ ipc_router_.SendChromeIdentityCheckResult(identity, identity == username);
}
}
+void SearchTabHelper::OnCheckUserSyncHistory() {
Mathieu 2014/11/05 13:38:42 OnHistorySyncCheck
beaudoin 2014/11/05 21:28:21 Done.
+ ipc_router_.SendCheckUserSyncHistoryResult(
+ IsHistorySyncEnabled(profile()));
+}
+
void SearchTabHelper::UpdateMode(bool update_origin, bool is_preloaded_ntp) {
SearchMode::Type type = SearchMode::MODE_DEFAULT;
SearchMode::Origin origin = SearchMode::ORIGIN_DEFAULT;

Powered by Google App Engine
This is Rietveld 408576698