Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: net/ftp/ftp_util.h

Issue 465059: Implement parser for Netware-style FTP LIST response listing. (Closed)
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/ftp/ftp_util.h
diff --git a/net/ftp/ftp_util.h b/net/ftp/ftp_util.h
index 2a73c685565244938b28ce926a15d2e274cb0f4c..518801bc906d76c8516b56db65fcd7b8ffc91090 100644
--- a/net/ftp/ftp_util.h
+++ b/net/ftp/ftp_util.h
@@ -9,6 +9,10 @@
#include "base/string16.h"
+namespace base {
+class Time;
+}
+
namespace net {
class FtpUtil {
@@ -25,6 +29,15 @@ class FtpUtil {
// Convert three-letter month abbreviation (like Nov) to its number (in range
// 1-12).
static bool ThreeLetterMonthToNumber(const string16& text, int* number);
+
+ // Convert a "ls -l" date listing to time. The listing comes in three columns.
+ // The first one contains month, the second one contains day of month.
+ // The first one is either a time (and then the current year is assumed),
+ // or is a year (and then we don't know the time).
+ static bool LsDateListingToTime(const string16& month,
+ const string16& day,
+ const string16& rest,
+ base::Time* time);
};
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698