| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/chromeos/fileapi/external_file_url_request_job.h" | 5 #include "chrome/browser/chromeos/fileapi/external_file_url_request_job.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 net::URLRequestJob* MaybeInterceptResponse( | 76 net::URLRequestJob* MaybeInterceptResponse( |
| 77 net::URLRequest* request, | 77 net::URLRequest* request, |
| 78 net::NetworkDelegate* network_delegate) const override { | 78 net::NetworkDelegate* network_delegate) const override { |
| 79 return nullptr; | 79 return nullptr; |
| 80 } | 80 } |
| 81 | 81 |
| 82 bool IsHandledProtocol(const std::string& scheme) const override { | 82 bool IsHandledProtocol(const std::string& scheme) const override { |
| 83 return scheme == content::kExternalFileScheme; | 83 return scheme == content::kExternalFileScheme; |
| 84 } | 84 } |
| 85 | 85 |
| 86 bool IsHandledURL(const GURL& url) const override { | |
| 87 return url.is_valid() && IsHandledProtocol(url.scheme()); | |
| 88 } | |
| 89 | |
| 90 bool IsSafeRedirectTarget(const GURL& location) const override { | 86 bool IsSafeRedirectTarget(const GURL& location) const override { |
| 91 return true; | 87 return true; |
| 92 } | 88 } |
| 93 | 89 |
| 94 private: | 90 private: |
| 95 void* const profile_id_; | 91 void* const profile_id_; |
| 96 DISALLOW_COPY_AND_ASSIGN(TestURLRequestJobFactory); | 92 DISALLOW_COPY_AND_ASSIGN(TestURLRequestJobFactory); |
| 97 }; | 93 }; |
| 98 | 94 |
| 99 class TestDelegate : public net::TestDelegate { | 95 class TestDelegate : public net::TestDelegate { |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 "Range", "Wrong Range Header Value", false /* overwrite */); | 405 "Range", "Wrong Range Header Value", false /* overwrite */); |
| 410 request->Start(); | 406 request->Start(); |
| 411 | 407 |
| 412 base::RunLoop().Run(); | 408 base::RunLoop().Run(); |
| 413 | 409 |
| 414 EXPECT_EQ(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE, | 410 EXPECT_EQ(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE, |
| 415 test_delegate_->request_status()); | 411 test_delegate_->request_status()); |
| 416 } | 412 } |
| 417 | 413 |
| 418 } // namespace chromeos | 414 } // namespace chromeos |
| OLD | NEW |