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

Unified Diff: net/ftp/ftp_util.h

Issue 6697021: FTP: use ICU to parse month abbreviations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed the comments Created 9 years, 9 months 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 eb7e96309d0b04fd51d0fe61be7ac6afacea2cf3..64fc6cd2804292e097039b1b81cf35d61ca71df4 100644
--- a/net/ftp/ftp_util.h
+++ b/net/ftp/ftp_util.h
@@ -18,22 +18,23 @@ namespace net {
class FtpUtil {
public:
- // Convert Unix file path to VMS path (must be a file, and not a directory).
+ // Converts Unix file path to VMS path (must be a file, and not a directory).
static std::string UnixFilePathToVMS(const std::string& unix_path);
- // Convert Unix directory path to VMS path (must be a directory).
+ // Converts Unix directory path to VMS path (must be a directory).
static std::string UnixDirectoryPathToVMS(const std::string& unix_path);
- // Convert VMS path to Unix-style path.
+ // Converts VMS path to Unix-style path.
static std::string VMSPathToUnix(const std::string& vms_path);
- // Convert three-letter month abbreviation (like Nov) to its number (in range
- // 1-12).
- static bool ThreeLetterMonthToNumber(const string16& text, int* number);
+ // Converts abbreviated month (like Nov) to its number (in range 1-12).
+ // Note: in some locales abbreviations are more than three letters long,
+ // and this function also handles them correctly.
+ static bool AbbreviatedMonthToNumber(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 we guess the year based
+ // Converts 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 third one is either a time (and then we guess the year based
// on |current_time|), or is a year (and then we don't know the time).
static bool LsDateListingToTime(const string16& month,
const string16& day,
@@ -41,7 +42,7 @@ class FtpUtil {
const base::Time& current_time,
base::Time* result);
- // Skip |columns| columns from |text| (whitespace-delimited), and return the
+ // Skips |columns| columns from |text| (whitespace-delimited), and returns the
// remaining part, without leading/trailing whitespace.
static string16 GetStringPartAfterColumns(const string16& text, int columns);
};

Powered by Google App Engine
This is Rietveld 408576698