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

Unified Diff: content/test/weburl_loader_mock.cc

Issue 1568073002: Reduce string copies in GURL creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac Created 4 years, 11 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: content/test/weburl_loader_mock.cc
diff --git a/content/test/weburl_loader_mock.cc b/content/test/weburl_loader_mock.cc
index 8f8b70494ea5a6b4c04d948b0e91b01c270635d7..7910c4d338f3ba2f4616c9328f6911328c098628 100644
--- a/content/test/weburl_loader_mock.cc
+++ b/content/test/weburl_loader_mock.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "content/child/web_url_loader_impl.h"
+#include "content/public/child/url_conversion.h"
#include "content/test/weburl_loader_mock_factory.h"
#include "third_party/WebKit/public/platform/WebData.h"
#include "third_party/WebKit/public/platform/WebURLError.h"
@@ -66,7 +67,8 @@ void WebURLLoaderMock::ServeAsynchronousRequest(
blink::WebURLRequest WebURLLoaderMock::ServeRedirect(
const blink::WebURLRequest& request,
const blink::WebURLResponse& redirectResponse) {
- GURL redirectURL(redirectResponse.httpHeaderField("Location"));
+ GURL redirectURL(
+ content::WebStringToGURL(redirectResponse.httpHeaderField("Location")));
net::RedirectInfo redirectInfo;
redirectInfo.new_method = request.httpMethod().utf8();

Powered by Google App Engine
This is Rietveld 408576698