| Index: chrome/browser/ui/search/search_tab_helper.cc
|
| diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc
|
| index d511a1806c016e4f4e3ea2d46e096d47d7872178..8b4884a529c69c2364691c52e7890dc6479ec426 100644
|
| --- a/chrome/browser/ui/search/search_tab_helper.cc
|
| +++ b/chrome/browser/ui/search/search_tab_helper.cc
|
| @@ -22,7 +22,6 @@
|
| #include "chrome/browser/ui/browser_window.h"
|
| #include "chrome/browser/ui/location_bar/location_bar.h"
|
| #include "chrome/browser/ui/omnibox/clipboard_utils.h"
|
| -#include "chrome/browser/ui/search/instant_tab.h"
|
| #include "chrome/browser/ui/search/search_ipc_router_policy_impl.h"
|
| #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
|
| #include "chrome/browser/ui/webui/ntp/ntp_user_data_logger.h"
|
| @@ -45,11 +44,9 @@
|
| #include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/common/browser_side_navigation_policy.h"
|
| -#include "content/public/common/referrer.h"
|
| #include "google_apis/gaia/gaia_auth_util.h"
|
| #include "net/base/net_errors.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| -#include "ui/base/page_transition_types.h"
|
| #include "url/gurl.h"
|
|
|
| DEFINE_WEB_CONTENTS_USER_DATA_KEY(SearchTabHelper);
|
| @@ -128,10 +125,9 @@ SearchTabHelper::SearchTabHelper(content::WebContents* web_contents)
|
| : WebContentsObserver(web_contents),
|
| is_search_enabled_(search::IsInstantExtendedAPIEnabled()),
|
| web_contents_(web_contents),
|
| - ipc_router_(
|
| - web_contents,
|
| - this,
|
| - base::WrapUnique(new SearchIPCRouterPolicyImpl(web_contents))),
|
| + ipc_router_(web_contents,
|
| + this,
|
| + base::MakeUnique<SearchIPCRouterPolicyImpl>(web_contents)),
|
| instant_service_(nullptr) {
|
| if (!is_search_enabled_)
|
| return;
|
| @@ -152,7 +148,7 @@ void SearchTabHelper::OmniboxInputStateChanged() {
|
| if (!is_search_enabled_)
|
| return;
|
|
|
| - UpdateMode(false);
|
| + UpdateMode(/*update_origin=*/false);
|
| }
|
|
|
| void SearchTabHelper::OmniboxFocusChanged(OmniboxFocusState state,
|
| @@ -175,7 +171,7 @@ void SearchTabHelper::NavigationEntryUpdated() {
|
| if (!is_search_enabled_)
|
| return;
|
|
|
| - UpdateMode(false);
|
| + UpdateMode(/*update_origin=*/false);
|
| }
|
|
|
| void SearchTabHelper::SetSuggestionToPrefetch(
|
| @@ -303,22 +299,14 @@ void SearchTabHelper::NavigationEntryCommitted(
|
| if (!load_details.is_main_frame)
|
| return;
|
|
|
| - UpdateMode(true);
|
| + UpdateMode(/*update_origin=*/true);
|
|
|
| - content::NavigationEntry* entry =
|
| - web_contents_->GetController().GetVisibleEntry();
|
| - DCHECK(entry);
|
| -
|
| - model_.SetInstantSupportState(INSTANT_SUPPORT_UNKNOWN);
|
| + InstantSupportChanged(InInstantProcess(profile(), web_contents_));
|
|
|
| if (InInstantProcess(profile(), web_contents_))
|
| ipc_router_.OnNavigationEntryCommitted();
|
| }
|
|
|
| -void SearchTabHelper::OnInstantSupportDetermined(bool supports_instant) {
|
| - InstantSupportChanged(supports_instant);
|
| -}
|
| -
|
| void SearchTabHelper::ThemeInfoChanged(const ThemeBackgroundInfo& theme_info) {
|
| ipc_router_.SendThemeBackgroundInfo(theme_info);
|
| }
|
|
|