| 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 #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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // Converts a "ls -l" date listing to time. The listing comes in three | 36 // Converts a "ls -l" date listing to time. The listing comes in three |
| 37 // columns. The first one contains month, the second one contains day | 37 // columns. The first one contains month, the second one contains day |
| 38 // of month. The third one is either a time (and then we guess the year based | 38 // of month. The third one is either a time (and then we guess the year based |
| 39 // on |current_time|), or is a year (and then we don't know the time). | 39 // on |current_time|), or is a year (and then we don't know the time). |
| 40 static bool LsDateListingToTime(const string16& month, | 40 static bool LsDateListingToTime(const string16& month, |
| 41 const string16& day, | 41 const string16& day, |
| 42 const string16& rest, | 42 const string16& rest, |
| 43 const base::Time& current_time, | 43 const base::Time& current_time, |
| 44 base::Time* result); | 44 base::Time* result); |
| 45 | 45 |
| 46 // Converts a Windows date listing to time. Returns true on success. |
| 47 static bool WindowsDateListingToTime(const string16& date, |
| 48 const string16& time, |
| 49 base::Time* result); |
| 50 |
| 46 // Skips |columns| columns from |text| (whitespace-delimited), and returns the | 51 // Skips |columns| columns from |text| (whitespace-delimited), and returns the |
| 47 // remaining part, without leading/trailing whitespace. | 52 // remaining part, without leading/trailing whitespace. |
| 48 static string16 GetStringPartAfterColumns(const string16& text, int columns); | 53 static string16 GetStringPartAfterColumns(const string16& text, int columns); |
| 49 }; | 54 }; |
| 50 | 55 |
| 51 } // namespace net | 56 } // namespace net |
| 52 | 57 |
| 53 #endif // NET_FTP_FTP_UTIL_H_ | 58 #endif // NET_FTP_FTP_UTIL_H_ |
| OLD | NEW |