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

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: Fix compile. 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/search/local_omnibox_popup_source.cc ('k') | chrome/browser/search/search_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/search.cc
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index 438533603a8297e46ab6242fb98ccc8504246169..0fb9bade9f83b215944a6194fa32cef98fda4adf 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();
}
@@ -318,9 +319,7 @@ bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile) {
return url.is_valid() &&
profile &&
(url.SchemeIs(chrome::kChromeSearchScheme) ||
- IsInstantURL(url, profile) ||
- (IsInstantExtendedAPIEnabled() &&
- url == GURL(chrome::kChromeSearchLocalOmniboxPopupURL)));
+ IsInstantURL(url, profile));
}
void RegisterUserPrefs(PrefRegistrySyncable* registry) {
« no previous file with comments | « chrome/browser/search/local_omnibox_popup_source.cc ('k') | chrome/browser/search/search_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698