| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef NET_FTP_FTP_UTIL_H_ | 5 #ifndef NET_FTP_FTP_UTIL_H_ |
| 6 #define NET_FTP_FTP_UTIL_H_ | 6 #define NET_FTP_FTP_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // Convert VMS path to Unix-style path. | 26 // Convert VMS path to Unix-style path. |
| 27 static std::string VMSPathToUnix(const std::string& vms_path); | 27 static std::string VMSPathToUnix(const std::string& vms_path); |
| 28 | 28 |
| 29 // Convert three-letter month abbreviation (like Nov) to its number (in range | 29 // Convert three-letter month abbreviation (like Nov) to its number (in range |
| 30 // 1-12). | 30 // 1-12). |
| 31 static bool ThreeLetterMonthToNumber(const string16& text, int* number); | 31 static bool ThreeLetterMonthToNumber(const string16& text, int* number); |
| 32 | 32 |
| 33 // Convert a "ls -l" date listing to time. The listing comes in three columns. | 33 // Convert a "ls -l" date listing to time. The listing comes in three columns. |
| 34 // The first one contains month, the second one contains day of month. | 34 // The first one contains month, the second one contains day of month. |
| 35 // The first one is either a time (and then the current year is assumed), | 35 // The first one is either a time (and then we guess the year based |
| 36 // or is a year (and then we don't know the time). | 36 // on |current_time|), or is a year (and then we don't know the time). |
| 37 static bool LsDateListingToTime(const string16& month, | 37 static bool LsDateListingToTime(const string16& month, |
| 38 const string16& day, | 38 const string16& day, |
| 39 const string16& rest, | 39 const string16& rest, |
| 40 base::Time* time); | 40 const base::Time& current_time, |
| 41 base::Time* result); |
| 41 | 42 |
| 42 // Skip |columns| columns from |text| (whitespace-delimited), and return the | 43 // Skip |columns| columns from |text| (whitespace-delimited), and return the |
| 43 // remaining part, without leading/trailing whitespace. | 44 // remaining part, without leading/trailing whitespace. |
| 44 static string16 GetStringPartAfterColumns(const string16& text, int columns); | 45 static string16 GetStringPartAfterColumns(const string16& text, int columns); |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 } // namespace net | 48 } // namespace net |
| 48 | 49 |
| 49 #endif // NET_FTP_FTP_UTIL_H_ | 50 #endif // NET_FTP_FTP_UTIL_H_ |
| OLD | NEW |