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

Unified Diff: components/search_engines/template_url.cc

Issue 396583002: Stop depending on InstantService from BaseSearchProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « components/search_engines/template_url.h ('k') | components/search_engines/template_url_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_engines/template_url.cc
diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc
index 054e2dc92beda2b9a7470953390d06152309f667..6d360924997a5eb8929de3ac92171b8d115f3911 100644
--- a/components/search_engines/template_url.cc
+++ b/components/search_engines/template_url.cc
@@ -181,7 +181,7 @@ TemplateURLRef::SearchTermsArgs::SearchTermsArgs(
input_type(metrics::OmniboxInputType::INVALID),
accepted_suggestion(NO_SUGGESTIONS_AVAILABLE),
cursor_position(base::string16::npos),
- omnibox_start_margin(-1),
+ enable_omnibox_start_margin(false),
page_classification(metrics::OmniboxEventProto::INVALID_SPEC),
bookmark_bar_pinned(false),
append_extra_query_params(false),
@@ -920,12 +920,12 @@ std::string TemplateURLRef::HandleReplacements(
case GOOGLE_OMNIBOX_START_MARGIN:
DCHECK(!i->is_post_param);
- if (search_terms_args.omnibox_start_margin >= 0) {
- HandleReplacement(
- "es_sm",
- base::IntToString(search_terms_args.omnibox_start_margin),
- *i,
- &url);
+ if (search_terms_args.enable_omnibox_start_margin) {
+ int omnibox_start_margin = search_terms_data.OmniboxStartMargin();
+ if (omnibox_start_margin >= 0) {
+ HandleReplacement("es_sm", base::IntToString(omnibox_start_margin),
+ *i, &url);
+ }
}
break;
« no previous file with comments | « components/search_engines/template_url.h ('k') | components/search_engines/template_url_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698