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

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: Answered kmadhusu and dcheng 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 1ed4f538a04f595aaf1e97253cca4e0e12fcd1e7..029de9b0d0702d01f41988e951011abada5cf086 100644
--- a/chrome/browser/ui/search/search_tab_helper.cc
+++ b/chrome/browser/ui/search/search_tab_helper.cc
@@ -565,14 +565,16 @@ 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);
+ } else {
+ ipc_router_.SendChromeIdentityCheckResult(identity, false);
}
}
+void SearchTabHelper::OnHistorySyncCheck() {
+ ipc_router_.SendHistorySyncCheckResult(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