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); |