Chromium Code Reviews| Index: content/browser/child_process_security_policy_unittest.cc |
| diff --git a/content/browser/child_process_security_policy_unittest.cc b/content/browser/child_process_security_policy_unittest.cc |
| index 4ef3306e8aee18a28c7b6892a28582db72e3e00b..a7ce5c219b1925e73b4ea677bc4a098c7b95b50b 100644 |
| --- a/content/browser/child_process_security_policy_unittest.cc |
| +++ b/content/browser/child_process_security_policy_unittest.cc |
| @@ -19,11 +19,18 @@ class ChildProcessSecurityPolicyTest : public testing::Test { |
| // testing::Test |
| virtual void SetUp() { |
| // In the real world, "chrome:" is a handled scheme. |
| - net::URLRequest::RegisterProtocolFactory(chrome::kChromeUIScheme, |
| - &net::URLRequestTestJob::Factory); |
| + RegisterProtocolFactory(chrome::kChromeUIScheme, |
| + &net::URLRequestTestJob::Factory); |
| } |
| virtual void TearDown() { |
| - net::URLRequest::RegisterProtocolFactory(chrome::kChromeUIScheme, NULL); |
| + RegisterProtocolFactory(chrome::kChromeUIScheme, NULL); |
| + } |
| + |
| + static net::URLRequest::ProtocolFactory* RegisterProtocolFactory( |
| + const std::string& scheme, |
| + net::URLRequest::ProtocolFactory* factory) { |
| + return net::URLRequest::Deprecated::RegisterProtocolFactory( |
| + scheme, factory); |
| } |
| }; |
| @@ -170,7 +177,7 @@ TEST_F(ChildProcessSecurityPolicyTest, RegisterWebSafeSchemeTest) { |
| EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL("asdf:rockers"))); |
| // Once we register a ProtocolFactory for "asdf", we default to deny. |
| - net::URLRequest::RegisterProtocolFactory("asdf", |
| + RegisterProtocolFactory("asdf", |
| &net::URLRequestTestJob::Factory); |
|
eroman
2011/07/18 22:24:03
indentation.
|
| EXPECT_FALSE(p->CanRequestURL(kRendererID, GURL("asdf:rockers"))); |
| @@ -179,7 +186,7 @@ TEST_F(ChildProcessSecurityPolicyTest, RegisterWebSafeSchemeTest) { |
| EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL("asdf:rockers"))); |
| // Cleanup. |
| - net::URLRequest::RegisterProtocolFactory("asdf", NULL); |
| + RegisterProtocolFactory("asdf", NULL); |
| EXPECT_TRUE(p->CanRequestURL(kRendererID, GURL("asdf:rockers"))); |
| p->Remove(kRendererID); |