| 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-inl.h" |
| 10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 } | 51 } |
| 52 } | 52 } |
| 53 | 53 |
| 54 return net::OK; | 54 return net::OK; |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace | 57 } // namespace |
| 58 | 58 |
| 59 namespace net { | 59 namespace net { |
| 60 | 60 |
| 61 FtpDirectoryListingEntry::FtpDirectoryListingEntry() { |
| 62 } |
| 63 |
| 61 int ParseFtpDirectoryListing(const std::string& text, | 64 int ParseFtpDirectoryListing(const std::string& text, |
| 62 const base::Time& current_time, | 65 const base::Time& current_time, |
| 63 std::vector<FtpDirectoryListingEntry>* entries) { | 66 std::vector<FtpDirectoryListingEntry>* entries) { |
| 64 std::string encoding; | 67 std::string encoding; |
| 65 | 68 |
| 66 string16 converted_text; | 69 string16 converted_text; |
| 67 int rv = ConvertStringToUTF16(text, &converted_text, &encoding); | 70 int rv = ConvertStringToUTF16(text, &converted_text, &encoding); |
| 68 if (rv != OK) | 71 if (rv != OK) |
| 69 return rv; | 72 return rv; |
| 70 | 73 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 96 UpdateFtpServerTypeHistograms(SERVER_NETWARE); | 99 UpdateFtpServerTypeHistograms(SERVER_NETWARE); |
| 97 return FillInRawName(encoding, entries); | 100 return FillInRawName(encoding, entries); |
| 98 } | 101 } |
| 99 | 102 |
| 100 entries->clear(); | 103 entries->clear(); |
| 101 UpdateFtpServerTypeHistograms(SERVER_UNKNOWN); | 104 UpdateFtpServerTypeHistograms(SERVER_UNKNOWN); |
| 102 return ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT; | 105 return ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT; |
| 103 } | 106 } |
| 104 | 107 |
| 105 } // namespace | 108 } // namespace |
| OLD | NEW |