| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stack> | 5 #include <stack> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 return temp; | 127 return temp; |
| 128 } else { | 128 } else { |
| 129 // Some of these tests trigger UpdateJobs which start URLRequests. | 129 // Some of these tests trigger UpdateJobs which start URLRequests. |
| 130 // We short circuit those be returning error jobs. | 130 // We short circuit those be returning error jobs. |
| 131 return new net::URLRequestErrorJob(request, | 131 return new net::URLRequestErrorJob(request, |
| 132 network_delegate, | 132 network_delegate, |
| 133 net::ERR_INTERNET_DISCONNECTED); | 133 net::ERR_INTERNET_DISCONNECTED); |
| 134 } | 134 } |
| 135 } | 135 } |
| 136 | 136 |
| 137 net::URLRequestJob* MaybeInterceptResponse( |
| 138 net::URLRequest* request, |
| 139 net::NetworkDelegate* network_delegate) const override { |
| 140 return NULL; |
| 141 } |
| 142 |
| 143 net::URLRequestJob* MaybeInterceptRedirect( |
| 144 net::URLRequest* request, |
| 145 net::NetworkDelegate* network_delegate, |
| 146 const GURL& location) const override { |
| 147 return NULL; |
| 148 } |
| 149 |
| 137 bool IsHandledProtocol(const std::string& scheme) const override { | 150 bool IsHandledProtocol(const std::string& scheme) const override { |
| 138 return scheme == "http"; | 151 return scheme == "http"; |
| 139 }; | 152 }; |
| 140 | 153 |
| 141 bool IsHandledURL(const GURL& url) const override { | 154 bool IsHandledURL(const GURL& url) const override { |
| 142 return url.SchemeIs("http"); | 155 return url.SchemeIs("http"); |
| 143 } | 156 } |
| 144 | 157 |
| 145 bool IsSafeRedirectTarget(const GURL& location) const override { | 158 bool IsSafeRedirectTarget(const GURL& location) const override { |
| 146 return false; | 159 return false; |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 | 1001 |
| 989 TEST_F(AppCacheRequestHandlerTest, WorkerRequest) { | 1002 TEST_F(AppCacheRequestHandlerTest, WorkerRequest) { |
| 990 RunTestOnIOThread(&AppCacheRequestHandlerTest::WorkerRequest); | 1003 RunTestOnIOThread(&AppCacheRequestHandlerTest::WorkerRequest); |
| 991 } | 1004 } |
| 992 | 1005 |
| 993 TEST_F(AppCacheRequestHandlerTest, MainResource_Blocked) { | 1006 TEST_F(AppCacheRequestHandlerTest, MainResource_Blocked) { |
| 994 RunTestOnIOThread(&AppCacheRequestHandlerTest::MainResource_Blocked); | 1007 RunTestOnIOThread(&AppCacheRequestHandlerTest::MainResource_Blocked); |
| 995 } | 1008 } |
| 996 | 1009 |
| 997 } // namespace content | 1010 } // namespace content |
| OLD | NEW |