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

Side by Side Diff: chrome/browser/ui/search/search_ipc_router.cc

Issue 2151483004: Remove embeddedSearch.newTabPage.GetAppLauncherEnabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused include, rebase Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/search/search_ipc_router.h" 5 #include "chrome/browser/ui/search/search_ipc_router.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/search/search.h" 10 #include "chrome/browser/search/search.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 identity_match)); 47 identity_match));
48 } 48 }
49 49
50 void SearchIPCRouter::SendHistorySyncCheckResult(bool sync_history) { 50 void SearchIPCRouter::SendHistorySyncCheckResult(bool sync_history) {
51 if (!policy_->ShouldProcessHistorySyncCheck()) 51 if (!policy_->ShouldProcessHistorySyncCheck())
52 return; 52 return;
53 53
54 Send(new ChromeViewMsg_HistorySyncCheckResult(routing_id(), sync_history)); 54 Send(new ChromeViewMsg_HistorySyncCheckResult(routing_id(), sync_history));
55 } 55 }
56 56
57 void SearchIPCRouter::SetPromoInformation(bool is_app_launcher_enabled) {
58 if (!policy_->ShouldSendSetPromoInformation())
59 return;
60
61 Send(new ChromeViewMsg_SearchBoxPromoInformation(routing_id(),
62 is_app_launcher_enabled));
63 }
64
65 void SearchIPCRouter::SetDisplayInstantResults() { 57 void SearchIPCRouter::SetDisplayInstantResults() {
66 if (!policy_->ShouldSendSetDisplayInstantResults()) 58 if (!policy_->ShouldSendSetDisplayInstantResults())
67 return; 59 return;
68 60
69 bool is_search_results_page = !search::GetSearchTerms(web_contents()).empty(); 61 bool is_search_results_page = !search::GetSearchTerms(web_contents()).empty();
70 bool display_instant_results = 62 bool display_instant_results =
71 is_search_results_page ? search::ShouldPrefetchSearchResultsOnSRP() 63 is_search_results_page ? search::ShouldPrefetchSearchResultsOnSRP()
72 : search::ShouldPrefetchSearchResults(); 64 : search::ShouldPrefetchSearchResults();
73 Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults( 65 Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults(
74 routing_id(), display_instant_results)); 66 routing_id(), display_instant_results));
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 291
300 void SearchIPCRouter::set_delegate_for_testing(Delegate* delegate) { 292 void SearchIPCRouter::set_delegate_for_testing(Delegate* delegate) {
301 DCHECK(delegate); 293 DCHECK(delegate);
302 delegate_ = delegate; 294 delegate_ = delegate;
303 } 295 }
304 296
305 void SearchIPCRouter::set_policy_for_testing(std::unique_ptr<Policy> policy) { 297 void SearchIPCRouter::set_policy_for_testing(std::unique_ptr<Policy> policy) {
306 DCHECK(policy.get()); 298 DCHECK(policy.get());
307 policy_.reset(policy.release()); 299 policy_.reset(policy.release());
308 } 300 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698