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

Unified Diff: chrome/browser/instant/search.cc

Issue 12840003: Implement local NTP for fallback. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Respond to Samarth's comments. Created 7 years, 9 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/instant/search.cc
diff --git a/chrome/browser/instant/search.cc b/chrome/browser/instant/search.cc
index 83c655a09c8ac109965133f487618566e6ffa4bc..7bebf5ff181d8924ea4365e43354a77642f51856 100644
--- a/chrome/browser/instant/search.cc
+++ b/chrome/browser/instant/search.cc
@@ -301,7 +301,8 @@ bool NavEntryIsInstantNTP(const content::WebContents* contents,
Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext());
return IsInstantExtendedAPIEnabled() &&
IsRenderedInInstantProcess(contents, profile) &&
- IsInstantURL(entry->GetVirtualURL(), profile) &&
+ (IsInstantURL(entry->GetVirtualURL(), profile) ||
+ entry->GetVirtualURL() == GURL(chrome::kChromeSearchLocalNTPURL)) &&
GetSearchTermsImpl(contents, entry).empty();
}
@@ -311,7 +312,8 @@ bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile) {
(url.SchemeIs(chrome::kChromeSearchScheme) ||
IsInstantURL(url, profile) ||
(IsInstantExtendedAPIEnabled() &&
- url == GURL(chrome::kChromeSearchLocalOmniboxPopupURL)));
+ (url == GURL(chrome::kChromeSearchLocalNTPURL) ||
+ url == GURL(chrome::kChromeSearchLocalOmniboxPopupURL))));
}
void RegisterUserPrefs(PrefRegistrySyncable* registry) {

Powered by Google App Engine
This is Rietveld 408576698