| 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 <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 net::URLRequestJob* temp = job_; | 65 net::URLRequestJob* temp = job_; |
| 66 job_ = NULL; | 66 job_ = NULL; |
| 67 return temp; | 67 return temp; |
| 68 } else { | 68 } else { |
| 69 return new net::URLRequestErrorJob(request, | 69 return new net::URLRequestErrorJob(request, |
| 70 network_delegate, | 70 network_delegate, |
| 71 net::ERR_INTERNET_DISCONNECTED); | 71 net::ERR_INTERNET_DISCONNECTED); |
| 72 } | 72 } |
| 73 } | 73 } |
| 74 | 74 |
| 75 net::URLRequestJob* MaybeInterceptRedirect( |
| 76 net::URLRequest* request, |
| 77 net::NetworkDelegate* network_delegate, |
| 78 const GURL& location) const override { |
| 79 return nullptr; |
| 80 } |
| 81 |
| 82 net::URLRequestJob* MaybeInterceptResponse( |
| 83 net::URLRequest* request, |
| 84 net::NetworkDelegate* network_delegate) const override { |
| 85 return nullptr; |
| 86 } |
| 87 |
| 75 bool IsHandledProtocol(const std::string& scheme) const override { | 88 bool IsHandledProtocol(const std::string& scheme) const override { |
| 76 return scheme == "http"; | 89 return scheme == "http"; |
| 77 }; | 90 }; |
| 78 | 91 |
| 79 bool IsHandledURL(const GURL& url) const override { | 92 bool IsHandledURL(const GURL& url) const override { |
| 80 return url.SchemeIs("http"); | 93 return url.SchemeIs("http"); |
| 81 } | 94 } |
| 82 | 95 |
| 83 bool IsSafeRedirectTarget(const GURL& location) const override { | 96 bool IsSafeRedirectTarget(const GURL& location) const override { |
| 84 return false; | 97 return false; |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 RunTestOnIOThread(&AppCacheURLRequestJobTest::CancelRequest); | 864 RunTestOnIOThread(&AppCacheURLRequestJobTest::CancelRequest); |
| 852 } | 865 } |
| 853 | 866 |
| 854 TEST_F(AppCacheURLRequestJobTest, CancelRequestWithIOPending) { | 867 TEST_F(AppCacheURLRequestJobTest, CancelRequestWithIOPending) { |
| 855 RunTestOnIOThread(&AppCacheURLRequestJobTest::CancelRequestWithIOPending); | 868 RunTestOnIOThread(&AppCacheURLRequestJobTest::CancelRequestWithIOPending); |
| 856 } | 869 } |
| 857 | 870 |
| 858 } // namespace | 871 } // namespace |
| 859 | 872 |
| 860 } // namespace content | 873 } // namespace content |
| OLD | NEW |