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

Unified Diff: trunk/src/chrome/browser/ui/search/search_tab_helper.cc

Issue 135903002: Revert 244407 "InstantExtended: remove dead code related to the ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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: trunk/src/chrome/browser/ui/search/search_tab_helper.cc
===================================================================
--- trunk/src/chrome/browser/ui/search/search_tab_helper.cc (revision 244428)
+++ trunk/src/chrome/browser/ui/search/search_tab_helper.cc (working copy)
@@ -70,7 +70,8 @@
bool IsCacheableNTP(const content::WebContents* contents) {
const content::NavigationEntry* entry =
contents->GetController().GetLastCommittedEntry();
- return chrome::NavEntryIsInstantNTP(contents, entry) &&
+ return chrome::ShouldUseCacheableNTP() &&
+ chrome::NavEntryIsInstantNTP(contents, entry) &&
entry->GetURL() != GURL(chrome::kChromeSearchLocalNtpUrl);
}
@@ -294,6 +295,7 @@
// navigation so it shouldn't be redirected.
if (is_main_frame &&
error_code != net::ERR_ABORTED &&
+ chrome::ShouldUseCacheableNTP() &&
validated_url != GURL(chrome::kChromeSearchLocalNtpUrl) &&
chrome::IsNTPURL(validated_url, profile())) {
RedirectToLocalNTP();

Powered by Google App Engine
This is Rietveld 408576698