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

Unified Diff: components/google/core/browser/google_util.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
Index: components/google/core/browser/google_util.cc
diff --git a/components/google/core/browser/google_util.cc b/components/google/core/browser/google_util.cc
index 307cebb3f7873ce81b6512dce632e5ec25b658de..58d2d21d33f3b00ffeaf2d651d40d228fddcf646 100644
--- a/components/google/core/browser/google_util.cc
+++ b/components/google/core/browser/google_util.cc
@@ -132,11 +132,9 @@ std::string GetGoogleCountryCode(GURL google_homepage_url) {
GURL GetGoogleSearchURL(GURL google_homepage_url) {
// To transform the homepage URL into the corresponding search URL, add the
// "search" and the "q=" query string.
- std::string search_path = "search";
- std::string query_string = "q=";
GURL::Replacements replacements;
- replacements.SetPathStr(search_path);
- replacements.SetQueryStr(query_string);
+ replacements.SetPathStr("search");
+ replacements.SetQueryStr("q=");
return google_homepage_url.ReplaceComponents(replacements);
}
« no previous file with comments | « chrome/renderer/safe_browsing/phishing_classifier_browsertest.cc ('k') | components/omnibox/autocomplete_match.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698