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

Unified Diff: components/search_engines/template_url_parser_unittest.cc

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 years, 3 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
Index: components/search_engines/template_url_parser_unittest.cc
diff --git a/components/search_engines/template_url_parser_unittest.cc b/components/search_engines/template_url_parser_unittest.cc
index ea94a51f2f2550c4ddcd73f64d3c4a5d5354a9a9..1e7dc02b19f105a5a43161fab4e3913bc070c97f 100644
--- a/components/search_engines/template_url_parser_unittest.cc
+++ b/components/search_engines/template_url_parser_unittest.cc
@@ -20,7 +20,7 @@ using base::ASCIIToUTF16;
// occurrence of value_str_ in its value.
class ParamFilterImpl : public TemplateURLParser::ParameterFilter {
public:
- ParamFilterImpl(std::string name_str, std::string value_str);
+ ParamFilterImpl(const std::string& name_str, const std::string& value_str);
~ParamFilterImpl() override;
bool KeepParameter(const std::string& key, const std::string& value) override;
@@ -32,10 +32,9 @@ class ParamFilterImpl : public TemplateURLParser::ParameterFilter {
DISALLOW_COPY_AND_ASSIGN(ParamFilterImpl);
};
-ParamFilterImpl::ParamFilterImpl(std::string name_str, std::string value_str)
- : name_str_(name_str),
- value_str_(value_str) {
-}
+ParamFilterImpl::ParamFilterImpl(const std::string& name_str,
+ const std::string& value_str)
+ : name_str_(name_str), value_str_(value_str) {}
ParamFilterImpl::~ParamFilterImpl() {
}

Powered by Google App Engine
This is Rietveld 408576698