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

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: 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..62922e2a0a0b0d46bf30a4ffe0b6c7ecade5d589 100644
--- a/content/test/weburl_loader_mock.cc
+++ b/content/test/weburl_loader_mock.cc
@@ -8,6 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "content/child/web_url_loader_impl.h"
#include "content/test/weburl_loader_mock_factory.h"
+#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebData.h"
#include "third_party/WebKit/public/platform/WebURLError.h"
#include "third_party/WebKit/public/platform/WebURLLoaderClient.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(
+ blink::WebStringToGURL(redirectResponse.httpHeaderField("Location")));
net::RedirectInfo redirectInfo;
redirectInfo.new_method = request.httpMethod().utf8();
« no previous file with comments | « content/renderer/shared_worker/embedded_shared_worker_stub.cc ('k') | mandoline/services/updater/updater_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698