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

Unified Diff: chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.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: chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
diff --git a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
index 5a50aff851f8ff1e071289b49ceb2ea344f3fa91..221e8ebde435bdecf292ed626b2aaed706502a7b 100644
--- a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
+++ b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
@@ -24,6 +24,7 @@
#include "net/base/escape.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "testing/gmock/include/gmock/gmock.h"
+#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@@ -94,7 +95,7 @@ class TestPhishingDOMFeatureExtractor : public PhishingDOMFeatureExtractor {
GURL full_url;
if (parsed_url.has_scheme()) {
// This is already a complete URL.
- full_url = GURL(partial_url);
+ full_url = GURL(blink::WebStringToGURL(partial_url));
} else if (!base_domain_.empty()) {
// This is a partial URL and only one frame in testing html.
full_url = GURL("http://" + base_domain_).Resolve(partial_url);
« no previous file with comments | « chrome/renderer/prerender/prerender_dispatcher.cc ('k') | chrome/renderer/worker_content_settings_client_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698