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

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

Issue 2232863002: Remove search::GetSearchTerms since it always returns empty string (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_query_extract
Patch Set: Android Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm ('k') | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/instant_controller.cc
diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc
index 8dd31cc5aa5d8eebf1da4aec32381eb0c1e663de..ce3772f2e2fe52a4892f304804bd131e4c7fc6a1 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -34,16 +34,15 @@ bool IsContentsFrom(const InstantTab* page,
// Adds a transient NavigationEntry to the supplied |contents|'s
// NavigationController if the page's URL has not already been updated with the
-// supplied |search_terms|. Sets the |search_terms| on the transient entry for
-// search terms extraction to work correctly.
+// supplied |search_terms|.
+// TODO(treib): Is it safe to completely remove this? crbug.com/627747
void EnsureSearchTermsAreSet(content::WebContents* contents,
const base::string16& search_terms) {
content::NavigationController* controller = &contents->GetController();
// If search terms are already correct or there is already a transient entry
// (there shouldn't be), bail out early.
- if (search::GetSearchTerms(contents) == search_terms ||
- controller->GetTransientEntry())
+ if (search_terms.empty() || controller->GetTransientEntry())
return;
const content::NavigationEntry* entry = controller->GetLastCommittedEntry();
@@ -51,7 +50,6 @@ void EnsureSearchTermsAreSet(content::WebContents* contents,
controller->CreateNavigationEntry(
entry->GetURL(), entry->GetReferrer(), entry->GetTransitionType(),
false, std::string(), contents->GetBrowserContext());
- transient->SetExtraData(sessions::kSearchTermsKey, search_terms);
controller->SetTransientEntry(std::move(transient));
SearchTabHelper::FromWebContents(contents)->NavigationEntryUpdated();
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm ('k') | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698