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

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

Issue 1420053005: Move code in components/safe_browsing_db and chrome/browser/s_b/ under the safe_browsing namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@02_components_move
Patch Set: Bring back anon namespace. Remove safe_browsing:: wherever not needed. 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/threat_details_unittest.cc
diff --git a/chrome/browser/safe_browsing/threat_details_unittest.cc b/chrome/browser/safe_browsing/threat_details_unittest.cc
index f537c5c9948b2c84924703605f9f9b1e1a8ee99d..29c551da256a3e3d20403bd3f5b5cadefe10e9ff 100644
--- a/chrome/browser/safe_browsing/threat_details_unittest.cc
+++ b/chrome/browser/safe_browsing/threat_details_unittest.cc
@@ -33,6 +33,13 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
+using content::BrowserThread;
+using content::WebContents;
+
+namespace safe_browsing {
+
+namespace {
+
// Mixture of HTTP and HTTPS. No special treatment for HTTPS.
static const char* kOriginalLandingURL =
"http://www.originallandingpage.com/with/path";
@@ -57,12 +64,6 @@ static const char* kLandingHeaders =
static const char* kLandingData =
"<iframe src='http://www.malware.com/with/path'>";
-using content::BrowserThread;
-using content::WebContents;
-using safe_browsing::ClientMalwareReportRequest;
-
-namespace {
-
void WriteHeaders(disk_cache::Entry* entry, const std::string& headers) {
net::HttpResponseInfo responseinfo;
std::string raw_headers =
@@ -175,7 +176,7 @@ class MockSafeBrowsingUIManager : public SafeBrowsingUIManager {
DISALLOW_COPY_AND_ASSIGN(MockSafeBrowsingUIManager);
};
-} // namespace.
+} // namespace
class ThreatDetailsTest : public ChromeRenderViewHostTestHarness {
public:
@@ -561,10 +562,10 @@ TEST_F(ThreatDetailsTest, HTTPCache) {
ClientMalwareReportRequest::Resource* pb_resource = expected.add_resources();
pb_resource->set_id(0);
pb_resource->set_url(kLandingURL);
- safe_browsing::ClientMalwareReportRequest::HTTPResponse* pb_response =
+ ClientMalwareReportRequest::HTTPResponse* pb_response =
pb_resource->mutable_response();
pb_response->mutable_firstline()->set_code(200);
- safe_browsing::ClientMalwareReportRequest::HTTPHeader* pb_header =
+ ClientMalwareReportRequest::HTTPHeader* pb_header =
pb_response->add_headers();
pb_header->set_name("Content-Type");
pb_header->set_value("text/html");
@@ -697,3 +698,5 @@ TEST_F(ThreatDetailsTest, HistoryServiceUrls) {
VerifyResults(actual, expected);
}
+
+} // namespace safe_browsing

Powered by Google App Engine
This is Rietveld 408576698