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

Unified Diff: chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc

Issue 2649413002: Use explicit WebString conversions in chrome/renderer/safe_browsing (Closed)
Patch Set: addressed comments Created 3 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
« no previous file with comments | « chrome/renderer/safe_browsing/phishing_classifier.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a0ac57cd7c0efe7d51a2d90c6f0a7aebaa1559de..ad855401eb55b31fb894faab9e16d897377e98b5 100644
--- a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
+++ b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
@@ -93,14 +93,14 @@ class TestPhishingDOMFeatureExtractor : public PhishingDOMFeatureExtractor {
// this issue.
blink::WebURL CompleteURL(const blink::WebElement& element,
const blink::WebString& partial_url) override {
- GURL parsed_url(GURL(partial_url.utf8()));
+ GURL parsed_url = blink::WebStringToGURL(partial_url);
GURL full_url;
if (parsed_url.has_scheme()) {
// This is already a complete URL.
- full_url = GURL(blink::WebStringToGURL(partial_url));
+ full_url = parsed_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);
+ full_url = GURL("http://" + base_domain_).Resolve(partial_url.utf8());
} else {
auto it = url_to_frame_domain_map_.find(partial_url.utf8());
if (it != url_to_frame_domain_map_.end()) {
« no previous file with comments | « chrome/renderer/safe_browsing/phishing_classifier.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698