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

Unified Diff: net/http/http_stream_factory_impl.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 | « extensions/browser/guest_view/web_view/web_view_apitest.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl.cc
diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
index 78238b946e13d20a976dfae78b28239117748c98..235122d2e834ae363f77203bc88277c5ad2c96e5 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -24,11 +24,10 @@ namespace {
GURL UpgradeUrlToHttps(const GURL& original_url, int port) {
GURL::Replacements replacements;
- // new_sheme and new_port need to be in scope here because GURL::Replacements
- // references the memory contained by them directly.
- const std::string new_scheme = "https";
+ // new_port needs to be in scope here because GURL::Replacements references
+ // the memory contained by it directly.
const std::string new_port = base::IntToString(port);
- replacements.SetSchemeStr(new_scheme);
+ replacements.SetSchemeStr("https");
replacements.SetPortStr(new_port);
return original_url.ReplaceComponents(replacements);
}
« no previous file with comments | « extensions/browser/guest_view/web_view/web_view_apitest.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698