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

Unified Diff: chrome/browser/search_engines/template_url.cc

Issue 10382164: Correctly ignore unknown parameters in prepopulated URLs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search_engines/template_url.cc
===================================================================
--- chrome/browser/search_engines/template_url.cc (revision 137035)
+++ chrome/browser/search_engines/template_url.cc (working copy)
@@ -407,12 +407,11 @@
replacements->push_back(Replacement(GOOGLE_SEARCH_FIELDTRIAL_GROUP, start));
} else if (parameter == kGoogleUnescapedSearchTermsParameter) {
replacements->push_back(Replacement(GOOGLE_UNESCAPED_SEARCH_TERMS, start));
- } else {
+ } else if (!prepopulated_) {
// If it's a prepopulated URL, we know that it's safe to remove unknown
- // parameters. Otherwise it could be some garbage but can also be a
- // javascript block. Put it back.
- if (!prepopulated_)
- url->insert(start, full_parameter);
+ // parameters, so just ignore this and return true below. Otherwise it could
+ // be some garbage but can also be a javascript block. Put it back.
+ url->insert(start, full_parameter);
return false;
}
return true;
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698