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

Unified Diff: chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc

Issue 5384002: net: Remove typedef net::URLRequest URLRequest; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 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/renderer_host/resource_dispatcher_host_unittest.cc
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc b/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc
index 209bce31ab629494d81083ba0bec65ec85ed7afd..4ca79aca620746d7f42ea563da9f4aa9139c15f1 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc
@@ -184,15 +184,16 @@ class ResourceDispatcherHostTest : public testing::Test,
DCHECK(!test_fixture_);
test_fixture_ = this;
ChildProcessSecurityPolicy::GetInstance()->Add(0);
- URLRequest::RegisterProtocolFactory("test",
- &ResourceDispatcherHostTest::Factory);
+ net::URLRequest::RegisterProtocolFactory(
+ "test",
+ &ResourceDispatcherHostTest::Factory);
EnsureTestSchemeIsAllowed();
}
virtual void TearDown() {
- URLRequest::RegisterProtocolFactory("test", NULL);
+ net::URLRequest::RegisterProtocolFactory("test", NULL);
if (!scheme_.empty())
- URLRequest::RegisterProtocolFactory(scheme_, old_factory_);
+ net::URLRequest::RegisterProtocolFactory(scheme_, old_factory_);
DCHECK(test_fixture_ == this);
test_fixture_ = NULL;
@@ -250,12 +251,12 @@ class ResourceDispatcherHostTest : public testing::Test,
DCHECK(scheme_.empty());
DCHECK(!old_factory_);
scheme_ = scheme;
- old_factory_ = URLRequest::RegisterProtocolFactory(
- scheme_, &ResourceDispatcherHostTest::Factory);
+ old_factory_ = net::URLRequest::RegisterProtocolFactory(
+ scheme_, &ResourceDispatcherHostTest::Factory);
}
// Our own URLRequestJob factory.
- static URLRequestJob* Factory(URLRequest* request,
+ static URLRequestJob* Factory(net::URLRequest* request,
const std::string& scheme) {
if (test_fixture_->response_headers_.empty()) {
return new URLRequestTestJob(request);
@@ -273,7 +274,7 @@ class ResourceDispatcherHostTest : public testing::Test,
std::string response_headers_;
std::string response_data_;
std::string scheme_;
- URLRequest::ProtocolFactory* old_factory_;
+ net::URLRequest::ProtocolFactory* old_factory_;
ResourceType::Type resource_type_;
static ResourceDispatcherHostTest* test_fixture_;
};
@@ -651,7 +652,7 @@ TEST_F(ResourceDispatcherHostTest, TestBlockedRequestsDontLeak) {
// Test the private helper method "CalculateApproximateMemoryCost()".
TEST_F(ResourceDispatcherHostTest, CalculateApproximateMemoryCost) {
- URLRequest req(GURL("http://www.google.com"), NULL);
+ net::URLRequest req(GURL("http://www.google.com"), NULL);
EXPECT_EQ(4427, ResourceDispatcherHost::CalculateApproximateMemoryCost(&req));
// Add 9 bytes of referrer.

Powered by Google App Engine
This is Rietveld 408576698