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

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

Issue 135383002: InstantExtended: assign all cacheable NTPs to the same process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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
« no previous file with comments | « no previous file | no next file » | 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 d4cc07018e8a500624ec0f239b0ae6e8e61c2757..0a024b70d5f64fbaa41144c76cc52789bb28106e 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -541,15 +541,11 @@ GURL GetEffectiveURLForInstant(const GURL& url, Profile* profile) {
// If the URL corresponds to an online NTP, replace the host with
// "online-ntp".
std::string online_ntp_host(chrome::kChromeSearchOnlineNtpHost);
- TemplateURL* template_url = GetDefaultSearchProviderTemplateURL(profile);
- if (template_url) {
- const GURL instant_url = TemplateURLRefToGURL(
- template_url->instant_url_ref(), kDisableStartMargin, false, false);
- if (instant_url.is_valid() &&
- search::MatchesOriginAndPath(url, instant_url)) {
- replacements.SetHost(online_ntp_host.c_str(),
- url_parse::Component(0, online_ntp_host.length()));
- }
+ const GURL new_tab_url(GetNewTabPageURL(profile));
+ if (new_tab_url.is_valid() &&
+ search::MatchesOriginAndPath(url, new_tab_url)) {
+ replacements.SetHost(online_ntp_host.c_str(),
kmadhusu 2014/01/13 17:12:19 Do we need to change the host to "ntp" or somethin
samarth 2014/02/03 22:47:12 This will make the host for the cacheable NTP be "
kmadhusu 2014/02/03 22:54:25 Yes. Do we need to change the host name to "cachea
samarth 2014/02/03 23:32:19 This name is not persisted anywhere, so it doesn't
+ url_parse::Component(0, online_ntp_host.length()));
}
effective_url = effective_url.ReplaceComponents(replacements);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698