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

Unified Diff: chrome/browser/ui/search/search_ipc_router.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_ipc_router.cc
diff --git a/chrome/browser/ui/search/search_ipc_router.cc b/chrome/browser/ui/search/search_ipc_router.cc
index c81a1e99229a4ff3346a81b537cd20bde1bdc59f..a1193d5bc8d755a6ed96a4bfdc5dd57d9f542ee4 100644
--- a/chrome/browser/ui/search/search_ipc_router.cc
+++ b/chrome/browser/ui/search/search_ipc_router.cc
@@ -61,6 +61,14 @@ void SearchIPCRouter::SendChromeIdentityCheckResult(
identity_match));
}
+void SearchIPCRouter::SendCheckUserSyncHistoryResult(bool sync_history) {
+ if (!policy_->ShouldProcessSyncHistoryCheck())
+ return;
+
+ Send(new ChromeViewMsg_CheckUserSyncHistoryResult(routing_id(),
+ sync_history));
+}
+
void SearchIPCRouter::SetPromoInformation(bool is_app_launcher_enabled) {
if (!policy_->ShouldSendSetPromoInformation())
return;
@@ -179,6 +187,8 @@ bool SearchIPCRouter::OnMessageReceived(const IPC::Message& message) {
OnLogMostVisitedNavigation);
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_PasteAndOpenDropdown,
OnPasteAndOpenDropDown);
+ IPC_MESSAGE_HANDLER(ChromeViewHostMsg_CheckUserSyncHistory,
+ OnCheckUserSyncHistory);
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ChromeIdentityCheck,
OnChromeIdentityCheck);
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -332,6 +342,17 @@ void SearchIPCRouter::OnChromeIdentityCheck(
delegate_->OnChromeIdentityCheck(identity);
}
+void SearchIPCRouter::OnCheckUserSyncHistory(int page_seq_no) const {
+ if (page_seq_no != commit_counter_)
+ return;
+
+ delegate_->OnInstantSupportDetermined(true);
+ if (!policy_->ShouldProcessSyncHistoryCheck())
+ return;
+
+ delegate_->OnCheckUserSyncHistory();
+}
+
void SearchIPCRouter::set_delegate_for_testing(Delegate* delegate) {
DCHECK(delegate);
delegate_ = delegate;

Powered by Google App Engine
This is Rietveld 408576698