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

Unified Diff: chrome/browser/instant/instant_controller.cc

Issue 11884037: InstantExtended: Bail on TemplateURLs with no espv. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split out edited check. Created 7 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 | chrome/browser/search_engines/template_url.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_controller.cc
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index c8acaa796e93ed6dda019121ff37e303f88e0ea8..86ea5a85fc86fc7036778c26167ea626ea95d74e 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -1190,6 +1190,17 @@ bool InstantController::GetInstantURL(const TemplateURL* template_url,
if (!template_url)
return false;
+ // If the user has edited the TemplateURL, the instant_url may no longer be
+ // correct (since it is not editable).
sky 2013/01/16 22:24:05 It's not editable, it's more of since we don't mig
Jered 2013/01/16 22:49:10 Done.
+ if (!template_url->safe_for_autoreplace())
+ return false;
+
+ // Extended mode won't work properly unless the TemplateURL supports the
+ // param to enable it on the server.
+ if (extended_enabled_ &&
+ template_url->search_terms_replacement_key().empty())
+ return false;
+
const TemplateURLRef& instant_url_ref = template_url->instant_url_ref();
if (!instant_url_ref.IsValid())
return false;
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698