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

Unified Diff: components/search_engines/search_terms_data.cc

Issue 889463003: GURL::Replacements methods accept a StringPiece instead of std::string&. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase (fixed some merge conflicts). Created 5 years, 10 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/omnibox/autocomplete_match.cc ('k') | components/search_engines/template_url.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_engines/search_terms_data.cc
diff --git a/components/search_engines/search_terms_data.cc b/components/search_engines/search_terms_data.cc
index b1e9ed323cf49e2c969a5008f2fb3d03bc438765..da2713968603f061c972311024c8a997a4602d29 100644
--- a/components/search_engines/search_terms_data.cc
+++ b/components/search_engines/search_terms_data.cc
@@ -26,11 +26,7 @@ std::string SearchTermsData::GoogleBaseSuggestURLValue() const {
GURL::Replacements repl;
// Replace any existing path with "/complete/".
- // SetPathStr() requires its argument to stay in scope as long as |repl| is,
- // so "/complete/" can't be passed to SetPathStr() directly, it needs to be in
- // a variable.
- const std::string suggest_path("/complete/");
- repl.SetPathStr(suggest_path);
+ repl.SetPathStr("/complete/");
// Clear the query and ref.
repl.ClearQuery();
« no previous file with comments | « components/omnibox/autocomplete_match.cc ('k') | components/search_engines/template_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698