OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/url_request/file_protocol_handler.h" | 5 #include "net/url_request/file_protocol_handler.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
9 #include "net/base/net_util.h" | 9 #include "net/base/net_util.h" |
10 #include "net/url_request/url_request.h" | 10 #include "net/url_request/url_request.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 file_path.EndsWithSeparator() && | 37 file_path.EndsWithSeparator() && |
38 file_path.IsAbsolute()) { | 38 file_path.IsAbsolute()) { |
39 return new URLRequestFileDirJob(request, network_delegate, file_path); | 39 return new URLRequestFileDirJob(request, network_delegate, file_path); |
40 } | 40 } |
41 | 41 |
42 // Use a regular file request job for all non-directories (including invalid | 42 // Use a regular file request job for all non-directories (including invalid |
43 // file names). | 43 // file names). |
44 return new URLRequestFileJob(request, network_delegate, file_path); | 44 return new URLRequestFileJob(request, network_delegate, file_path); |
45 } | 45 } |
46 | 46 |
| 47 bool FileProtocolHandler::IsSafeRedirectTarget(const GURL& location) const { |
| 48 return false; |
| 49 } |
| 50 |
47 } // namespace net | 51 } // namespace net |
OLD | NEW |