OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ftp/ftp_directory_listing_parser.h" | 5 #include "net/ftp/ftp_directory_listing_parser.h" |
6 | 6 |
7 #include "base/i18n/icu_encoding_detection.h" | 7 #include "base/i18n/icu_encoding_detection.h" |
8 #include "base/i18n/icu_string_conversions.h" | 8 #include "base/i18n/icu_string_conversions.h" |
9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util.h" |
10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "net/ftp/ftp_directory_listing_parser_ls.h" | 13 #include "net/ftp/ftp_directory_listing_parser_ls.h" |
14 #include "net/ftp/ftp_directory_listing_parser_netware.h" | 14 #include "net/ftp/ftp_directory_listing_parser_netware.h" |
15 #include "net/ftp/ftp_directory_listing_parser_vms.h" | 15 #include "net/ftp/ftp_directory_listing_parser_vms.h" |
16 #include "net/ftp/ftp_directory_listing_parser_windows.h" | 16 #include "net/ftp/ftp_directory_listing_parser_windows.h" |
17 #include "net/ftp/ftp_server_type_histograms.h" | 17 #include "net/ftp/ftp_server_type_histograms.h" |
18 | 18 |
19 namespace net { | 19 namespace net { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 int ParseFtpDirectoryListing(const std::string& text, | 117 int ParseFtpDirectoryListing(const std::string& text, |
118 const base::Time& current_time, | 118 const base::Time& current_time, |
119 std::vector<FtpDirectoryListingEntry>* entries) { | 119 std::vector<FtpDirectoryListingEntry>* entries) { |
120 FtpServerType server_type = SERVER_UNKNOWN; | 120 FtpServerType server_type = SERVER_UNKNOWN; |
121 int rv = DecodeAndParse(text, current_time, entries, &server_type); | 121 int rv = DecodeAndParse(text, current_time, entries, &server_type); |
122 UpdateFtpServerTypeHistograms(server_type); | 122 UpdateFtpServerTypeHistograms(server_type); |
123 return rv; | 123 return rv; |
124 } | 124 } |
125 | 125 |
126 } // namespace net | 126 } // namespace net |
OLD | NEW |