| 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 ce3772f2e2fe52a4892f304804bd131e4c7fc6a1..e07de78e732019cfbf6935dda9ac8cca29bc5926 100644
|
| --- a/chrome/browser/ui/search/instant_controller.cc
|
| +++ b/chrome/browser/ui/search/instant_controller.cc
|
| @@ -32,29 +32,6 @@ bool IsContentsFrom(const InstantTab* page,
|
| return page && (page->web_contents() == contents);
|
| }
|
|
|
| -// 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|.
|
| -// 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_terms.empty() || controller->GetTransientEntry())
|
| - return;
|
| -
|
| - const content::NavigationEntry* entry = controller->GetLastCommittedEntry();
|
| - std::unique_ptr<content::NavigationEntry> transient =
|
| - controller->CreateNavigationEntry(
|
| - entry->GetURL(), entry->GetReferrer(), entry->GetTransitionType(),
|
| - false, std::string(), contents->GetBrowserContext());
|
| - controller->SetTransientEntry(std::move(transient));
|
| -
|
| - SearchTabHelper::FromWebContents(contents)->NavigationEntryUpdated();
|
| -}
|
| -
|
| } // namespace
|
|
|
| InstantController::InstantController(BrowserInstantController* browser)
|
| @@ -64,24 +41,6 @@ InstantController::InstantController(BrowserInstantController* browser)
|
| InstantController::~InstantController() {
|
| }
|
|
|
| -bool InstantController::SubmitQuery(const base::string16& search_terms,
|
| - const EmbeddedSearchRequestParams& params) {
|
| - if (!instant_tab_ || !instant_tab_->web_contents())
|
| - return false;
|
| -
|
| - SearchTabHelper* search_tab =
|
| - SearchTabHelper::FromWebContents(instant_tab_->web_contents());
|
| - if (!search_tab->SupportsInstant() || !search_mode_.is_origin_search())
|
| - return false;
|
| -
|
| - // Use |instant_tab_| to run the query if we're already on a search results
|
| - // page. (NOTE: in particular, we do not send the query to NTPs.)
|
| - search_tab->Submit(search_terms, params);
|
| - instant_tab_->web_contents()->Focus();
|
| - EnsureSearchTermsAreSet(instant_tab_->web_contents(), search_terms);
|
| - return true;
|
| -}
|
| -
|
| void InstantController::SearchModeChanged(const SearchMode& old_mode,
|
| const SearchMode& new_mode) {
|
| LogDebugEvent(base::StringPrintf(
|
|
|