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

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

Issue 137993020: (Try 2) InstantExtended: remove dead code related to the non-cacheable NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable InstantPolicyTests Created 6 years, 11 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
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 dea6d08d7d7f9d9032f810244f5e913fdc5bc398..a5db87a215a9236b0ade202c85df7e32905499a0 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -117,29 +117,6 @@ void InstantController::SetSuggestionToPrefetch(
}
}
-void InstantController::InstantPageLoadFailed(content::WebContents* contents) {
- DCHECK(IsContentsFrom(instant_tab(), contents));
-
- // Verify we're not already on a local page and that the URL precisely
- // equals the instant_url (minus the query params, as those will be filled
- // in by template values). This check is necessary to make sure we don't
- // inadvertently redirect to the local NTP if someone, say, reloads a SRP
- // while offline, as a committed results page still counts as an instant
- // url. We also check to make sure there's no forward history, as if
- // someone hits the back button a lot when offline and returns to a NTP
- // we don't want to redirect and nuke their forward history stack.
- const GURL& current_url = contents->GetURL();
- GURL instant_url = chrome::GetInstantURL(profile(),
- chrome::kDisableStartMargin, false);
- if (instant_tab_->IsLocal() ||
- !search::MatchesOriginAndPath(instant_url, current_url) ||
- !current_url.ref().empty() ||
- contents->GetController().CanGoForward())
- return;
- LOG_INSTANT_DEBUG_EVENT(this, "InstantPageLoadFailed: instant_tab");
- RedirectToLocalNTP(contents);
-}
-
bool InstantController::SubmitQuery(const base::string16& search_terms) {
if (instant_tab_ && instant_tab_->supports_instant() &&
search_mode_.is_origin_search()) {
@@ -296,17 +273,6 @@ bool InstantController::IsInputInProgress() const {
omnibox_focus_state_ == OMNIBOX_FOCUS_VISIBLE;
}
-void InstantController::RedirectToLocalNTP(content::WebContents* contents) {
- contents->GetController().LoadURL(
- GURL(chrome::kChromeSearchLocalNtpUrl),
- content::Referrer(),
- content::PAGE_TRANSITION_SERVER_REDIRECT,
- std::string()); // No extra headers.
- // TODO(dcblack): Remove extraneous history entry caused by 404s.
- // Note that the base case of a 204 being returned doesn't push a history
- // entry.
-}
-
InstantService* InstantController::GetInstantService() const {
return InstantServiceFactory::GetForProfile(profile());
}
« no previous file with comments | « chrome/browser/ui/search/instant_controller.h ('k') | chrome/browser/ui/search/instant_extended_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698