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

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

Issue 2829163004: Remove uses of base::hash_map from //chrome (Closed)
Patch Set: Fixes Created 3 years, 7 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 48b39e95443272e5febe6f210d05ed8ba4333046..cd200a139b5499cf0ce36cf84093f4f6d134ac35 100644
--- a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
+++ b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
@@ -5,6 +5,7 @@
#include "chrome/renderer/safe_browsing/phishing_dom_feature_extractor.h"
#include <memory>
+#include <unordered_map>
#include "base/bind.h"
#include "base/callback.h"
@@ -50,7 +51,7 @@ class TestPhishingDOMFeatureExtractor : public PhishingDOMFeatureExtractor {
void SetDocumentDomain(std::string domain) { base_domain_ = domain; }
void SetURLToFrameDomainCheckingMap(
- const base::hash_map<std::string, std::string>& checking_map) {
+ const std::unordered_map<std::string, std::string>& checking_map) {
url_to_frame_domain_map_ = checking_map;
}
@@ -122,7 +123,7 @@ class TestPhishingDOMFeatureExtractor : public PhishingDOMFeatureExtractor {
// If html contains multiple frame/iframe, we track domain of each frame by
// using this map, where keys are the urls mentioned in the html content,
// values are the domains of the corresponding frames.
- base::hash_map<std::string, std::string> url_to_frame_domain_map_;
+ std::unordered_map<std::string, std::string> url_to_frame_domain_map_;
};
class TestChromeContentRendererClient : public ChromeContentRendererClient {
@@ -154,7 +155,8 @@ class PhishingDOMFeatureExtractorTest : public ChromeRenderViewTest {
void ExtractFeaturesAcrossFrames(
const std::string& html_content,
FeatureMap* features,
- const base::hash_map<std::string, std::string>& url_frame_domain_map) {
+ const std::unordered_map<std::string, std::string>&
+ url_frame_domain_map) {
extractor_->SetURLToFrameDomainCheckingMap(url_frame_domain_map);
LoadHTML(html_content.c_str());
@@ -375,7 +377,7 @@ TEST_F(PhishingDOMFeatureExtractorTest, SubFrames) {
EXPECT_CALL(clock_, Now()).WillRepeatedly(Return(base::TimeTicks::Now()));
const char urlprefix[] = "data:text/html;charset=utf-8,";
- base::hash_map<std::string, std::string> url_iframe_map;
+ std::unordered_map<std::string, std::string> url_iframe_map;
std::string iframe1_nested_html(
"<html><body><input type=password>"
"<a href=\"https://host3.com/submit\">link</a>"

Powered by Google App Engine
This is Rietveld 408576698