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

Unified Diff: net/ftp/ftp_util.h

Issue 1120012: Fix the "ls -l" style date parser to correctly guess the year if it is not provided. (Closed)
Patch Set: better comments Created 10 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
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_netware_unittest.cc ('k') | net/ftp/ftp_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_util.h
diff --git a/net/ftp/ftp_util.h b/net/ftp/ftp_util.h
index 56436060835a3083b6c9c688f22aac9e137c089c..37a51c2cfbcf5af9a6972bd4818ff1f0f8290d81 100644
--- a/net/ftp/ftp_util.h
+++ b/net/ftp/ftp_util.h
@@ -32,12 +32,13 @@ class FtpUtil {
// 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).
+ // The first 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,
const string16& rest,
- base::Time* time);
+ const base::Time& current_time,
+ base::Time* result);
// Skip |columns| columns from |text| (whitespace-delimited), and return the
// remaining part, without leading/trailing whitespace.
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_netware_unittest.cc ('k') | net/ftp/ftp_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698