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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc

Issue 1410343012: Revert of Move more declarations from c/b/sb/sb_util.h to components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@01_components
Patch Set: Created 5 years, 1 month 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/browser/safe_browsing/safe_browsing_service_browsertest.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index 222cb7b9d30d3f2220a20e1a3f821c0679e748b8..f1d3971ac990c5997177c90971c1dfed013f97b9 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -138,8 +138,8 @@
std::vector<SBPrefix>* prefix_hits,
std::vector<SBFullHashResult>* cache_hits) override {
cache_hits->clear();
- return ContainsUrl(safe_browsing::MALWARE,
- safe_browsing::PHISH,
+ return ContainsUrl(safe_browsing_util::MALWARE,
+ safe_browsing_util::PHISH,
std::vector<GURL>(1, url),
prefix_hits);
}
@@ -148,8 +148,8 @@
std::vector<SBPrefix>* prefix_hits,
std::vector<SBFullHashResult>* cache_hits) override {
cache_hits->clear();
- return ContainsUrl(safe_browsing::UNWANTEDURL,
- safe_browsing::UNWANTEDURL,
+ return ContainsUrl(safe_browsing_util::UNWANTEDURL,
+ safe_browsing_util::UNWANTEDURL,
std::vector<GURL>(1, url),
prefix_hits);
}
@@ -157,8 +157,8 @@
const std::vector<SBPrefix>& prefixes,
std::vector<SBPrefix>* prefix_hits) override {
bool found =
- ContainsUrlPrefixes(safe_browsing::BINURL,
- safe_browsing::BINURL, prefixes, prefix_hits);
+ ContainsUrlPrefixes(safe_browsing_util::BINURL,
+ safe_browsing_util::BINURL, prefixes, prefix_hits);
if (!found)
return false;
DCHECK_LE(1U, prefix_hits->size());
@@ -424,8 +424,8 @@
SBFullHashResult* full_hash) {
std::string host;
std::string path;
- safe_browsing::CanonicalizeUrl(url, &host, &path, NULL);
- full_hash->hash = safe_browsing::SBFullHashForString(host + path);
+ safe_browsing_util::CanonicalizeUrl(url, &host, &path, NULL);
+ full_hash->hash = SBFullHashForString(host + path);
full_hash->list_id = list_id;
}
@@ -601,7 +601,7 @@
void GenUrlFullhashResultWithMetadata(const GURL& url,
SBFullHashResult* full_hash) {
- GenUrlFullhashResult(url, safe_browsing::MALWARE, full_hash);
+ GenUrlFullhashResult(url, safe_browsing_util::MALWARE, full_hash);
safe_browsing::MalwarePatternType proto;
switch (GetParam()) {
@@ -712,7 +712,7 @@
// Add the img url as coming from a site serving UwS and then load the parent
// page.
SBFullHashResult uws_full_hash;
- GenUrlFullhashResult(img_url, safe_browsing::UNWANTEDURL,
+ GenUrlFullhashResult(img_url, safe_browsing_util::UNWANTEDURL,
&uws_full_hash);
SetupResponseForUrl(img_url, uws_full_hash);
@@ -727,7 +727,7 @@
// After adding the url to safebrowsing database and getfullhash result,
// we should see the interstitial page.
SBFullHashResult malware_full_hash;
- GenUrlFullhashResult(url, safe_browsing::MALWARE, &malware_full_hash);
+ GenUrlFullhashResult(url, safe_browsing_util::MALWARE, &malware_full_hash);
EXPECT_CALL(observer_,
OnSafeBrowsingMatch(IsUnsafeResourceFor(url))).Times(1);
EXPECT_CALL(observer_, OnSafeBrowsingHit(IsUnsafeResourceFor(url))).Times(1)
@@ -781,7 +781,7 @@
// getfullhash result, we should not see the interstitial page since the
// only malware was a prefetch target.
SBFullHashResult malware_full_hash;
- GenUrlFullhashResult(malware_url, safe_browsing::MALWARE,
+ GenUrlFullhashResult(malware_url, safe_browsing_util::MALWARE,
&malware_full_hash);
SetupResponseForUrl(malware_url, malware_full_hash);
ui_test_utils::NavigateToURL(browser(), url);
@@ -896,7 +896,7 @@
EXPECT_EQ(SB_THREAT_TYPE_SAFE, client->GetThreatType());
SBFullHashResult full_hash_result;
- GenUrlFullhashResult(badbin_url, safe_browsing::BINURL,
+ GenUrlFullhashResult(badbin_url, safe_browsing_util::BINURL,
&full_hash_result);
SetupResponseForUrl(badbin_url, full_hash_result);
@@ -918,7 +918,7 @@
SBFullHashResult full_hash_result;
GenUrlFullhashResult(
- bad_url, safe_browsing::UNWANTEDURL, &full_hash_result);
+ bad_url, safe_browsing_util::UNWANTEDURL, &full_hash_result);
SetupResponseForUrl(bad_url, full_hash_result);
// Now, the bad_url is not safe since it is added to download
@@ -940,7 +940,7 @@
SBFullHashResult full_hash_result;
GenUrlFullhashResult(
- bad_url, safe_browsing::MALWARE, &full_hash_result);
+ bad_url, safe_browsing_util::MALWARE, &full_hash_result);
SetupResponseForUrl(bad_url, full_hash_result);
client->CheckBrowseUrl(bad_url);
@@ -960,7 +960,7 @@
SBFullHashResult full_hash_result;
GenUrlFullhashResult(
- bad_url, safe_browsing::MALWARE, &full_hash_result);
+ bad_url, safe_browsing_util::MALWARE, &full_hash_result);
SetupResponseForUrl(bad_url, full_hash_result);
// Now, the bad_url is not safe since it is added to download
@@ -983,7 +983,7 @@
SBFullHashResult full_hash_result;
GenUrlFullhashResult(
- bad_url, safe_browsing::UNWANTEDURL, &full_hash_result);
+ bad_url, safe_browsing_util::UNWANTEDURL, &full_hash_result);
SetupResponseForUrl(bad_url, full_hash_result);
client->CheckBrowseUrl(bad_url);
@@ -1007,7 +1007,7 @@
EXPECT_EQ(SB_THREAT_TYPE_SAFE, client->GetThreatType());
SBFullHashResult full_hash_result;
- GenUrlFullhashResult(badbin_url, safe_browsing::BINURL,
+ GenUrlFullhashResult(badbin_url, safe_browsing_util::BINURL,
&full_hash_result);
SetupResponseForUrl(badbin_url, full_hash_result);
@@ -1030,7 +1030,7 @@
scoped_refptr<TestSBClient> client(new TestSBClient);
SBFullHashResult full_hash_result;
- GenUrlFullhashResult(badbin_url, safe_browsing::BINURL,
+ GenUrlFullhashResult(badbin_url, safe_browsing_util::BINURL,
&full_hash_result);
SetupResponseForUrl(badbin_url, full_hash_result);
client->CheckDownloadUrl(badbin_urls);

Powered by Google App Engine
This is Rietveld 408576698