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

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: 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_ipc_router.cc
diff --git a/chrome/browser/ui/search/search_ipc_router.cc b/chrome/browser/ui/search/search_ipc_router.cc
index 9e592c5fc8297b9249b042b4f15907af3376a138..f755902e3859e4a6fffa0a7224a8ba1981f42c46 100644
--- a/chrome/browser/ui/search/search_ipc_router.cc
+++ b/chrome/browser/ui/search/search_ipc_router.cc
@@ -61,6 +61,13 @@ void SearchIPCRouter::SendChromeIdentityCheckResult(
identity_match));
}
+void SearchIPCRouter::SendHistorySyncCheckResult(bool sync_history) {
+ if (!policy_->ShouldProcessHistorySyncCheck())
+ return;
+
+ Send(new ChromeViewMsg_HistorySyncCheckResult(routing_id(), sync_history));
+}
+
void SearchIPCRouter::SetPromoInformation(bool is_app_launcher_enabled) {
if (!policy_->ShouldSendSetPromoInformation())
return;
@@ -180,6 +187,8 @@ bool SearchIPCRouter::OnMessageReceived(const IPC::Message& message) {
OnLogMostVisitedNavigation);
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_PasteAndOpenDropdown,
OnPasteAndOpenDropDown);
+ IPC_MESSAGE_HANDLER(ChromeViewHostMsg_HistorySyncCheck,
+ OnHistorySyncCheck);
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ChromeIdentityCheck,
OnChromeIdentityCheck);
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -333,6 +342,17 @@ void SearchIPCRouter::OnChromeIdentityCheck(
delegate_->OnChromeIdentityCheck(identity);
}
+void SearchIPCRouter::OnHistorySyncCheck(int page_seq_no) const {
+ if (page_seq_no != commit_counter_)
+ return;
+
+ delegate_->OnInstantSupportDetermined(true);
+ if (!policy_->ShouldProcessHistorySyncCheck())
+ return;
+
+ delegate_->OnHistorySyncCheck();
+}
+
void SearchIPCRouter::set_delegate_for_testing(Delegate* delegate) {
DCHECK(delegate);
delegate_ = delegate;

Powered by Google App Engine
This is Rietveld 408576698