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

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: 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
« no previous file with comments | « chrome/browser/instant/local_ntp_source.cc ('k') | chrome/browser/resources/local_ntp/local_ntp.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/search.cc
diff --git a/chrome/browser/instant/search.cc b/chrome/browser/instant/search.cc
index 2816d5250fcd482487b0feb49968e12830d62cdf..9f491fecbae997ef890b7af0c282269afa4da26b 100644
--- a/chrome/browser/instant/search.cc
+++ b/chrome/browser/instant/search.cc
@@ -302,7 +302,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)) &&
samarth 2013/03/15 22:14:29 Please add a unit test for the changes in this fil
jeremycho 2013/03/16 00:09:56 Done.
GetSearchTermsImpl(contents, entry).empty();
}
@@ -312,7 +313,8 @@ bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile) {
(url.SchemeIs(chrome::kChromeSearchScheme) ||
IsInstantURL(url, profile) ||
(IsInstantExtendedAPIEnabled() &&
- url == GURL(kLocalOmniboxPopupURL)));
+ (url == GURL(kLocalOmniboxPopupURL) ||
+ url == GURL(chrome::kChromeSearchLocalNTPURL))));
}
void RegisterUserPrefs(PrefRegistrySyncable* registry) {
« no previous file with comments | « chrome/browser/instant/local_ntp_source.cc ('k') | chrome/browser/resources/local_ntp/local_ntp.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698