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 "net/base/filename_util.h" | 5 #include "net/base/filename_util.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "base/threading/thread_restrictions.h" | 13 #include "base/threading/thread_restrictions.h" |
14 #include "net/base/escape.h" | 14 #include "net/base/escape.h" |
15 #include "net/base/filename_util_internal.h" | 15 #include "net/base/filename_util_internal.h" |
16 #include "net/base/mime_util.h" | |
17 #include "net/base/net_string_util.h" | 16 #include "net/base/net_string_util.h" |
18 #include "net/http/http_content_disposition.h" | 17 #include "net/http/http_content_disposition.h" |
19 #include "url/gurl.h" | 18 #include "url/gurl.h" |
20 | 19 |
21 namespace net { | 20 namespace net { |
22 | 21 |
23 // Prefix to prepend to get a file URL. | 22 // Prefix to prepend to get a file URL. |
24 static const base::FilePath::CharType kFileURLPrefix[] = | 23 static const base::FilePath::CharType kFileURLPrefix[] = |
25 FILE_PATH_LITERAL("file:///"); | 24 FILE_PATH_LITERAL("file:///"); |
26 | 25 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 if (file_path->value() == base::FilePath::kCurrentDirectory) { | 153 if (file_path->value() == base::FilePath::kCurrentDirectory) { |
155 *file_path = base::FilePath(leaf_name); | 154 *file_path = base::FilePath(leaf_name); |
156 } else { | 155 } else { |
157 *file_path = file_path->Append(leaf_name); | 156 *file_path = file_path->Append(leaf_name); |
158 } | 157 } |
159 } | 158 } |
160 #endif | 159 #endif |
161 } | 160 } |
162 | 161 |
163 } // namespace net | 162 } // namespace net |
OLD | NEW |