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

Unified Diff: chrome/browser/search/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/search/search.cc
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index 438533603a8297e46ab6242fb98ccc8504246169..b6832a480baae558e1b780b911dc63ecf1964d45 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -310,7 +310,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();
}
@@ -320,7 +321,8 @@ bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile) {
(url.SchemeIs(chrome::kChromeSearchScheme) ||
IsInstantURL(url, profile) ||
(IsInstantExtendedAPIEnabled() &&
- url == GURL(chrome::kChromeSearchLocalOmniboxPopupURL)));
+ (url == GURL(chrome::kChromeSearchLocalNTPURL) ||
samarth 2013/03/19 02:35:53 Actually these two checks are now redundant given
jeremycho 2013/03/19 03:30:35 Done.
+ url == GURL(chrome::kChromeSearchLocalOmniboxPopupURL))));
}
void RegisterUserPrefs(PrefRegistrySyncable* registry) {

Powered by Google App Engine
This is Rietveld 408576698