| Index: net/ftp/ftp_directory_listing_parser_netware.h
|
| diff --git a/net/ftp/ftp_directory_listing_parser_netware.h b/net/ftp/ftp_directory_listing_parser_netware.h
|
| index a3b2cef865cfa53bbbc3368a69f0283c682ab26f..aef490aa4b86a7565ab27e182dfa26595b0ebe3a 100644
|
| --- a/net/ftp/ftp_directory_listing_parser_netware.h
|
| +++ b/net/ftp/ftp_directory_listing_parser_netware.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include <queue>
|
|
|
| +#include "base/time.h"
|
| #include "net/ftp/ftp_directory_listing_parser.h"
|
|
|
| namespace net {
|
| @@ -14,7 +15,10 @@ namespace net {
|
| // Parser for Netware-style directory listing.
|
| class FtpDirectoryListingParserNetware : public FtpDirectoryListingParser {
|
| public:
|
| - FtpDirectoryListingParserNetware();
|
| + // Constructor. When the current time is needed to guess the year on partial
|
| + // date strings, |current_time| will be used. This allows passing a specific
|
| + // date during testing.
|
| + explicit FtpDirectoryListingParserNetware(const base::Time& current_time);
|
|
|
| // FtpDirectoryListingParser methods:
|
| virtual FtpServerType GetServerType() const { return SERVER_NETWARE; }
|
| @@ -27,6 +31,9 @@ class FtpDirectoryListingParserNetware : public FtpDirectoryListingParser {
|
| // True after we have received the first line of input.
|
| bool received_first_line_;
|
|
|
| + // Store the current time. We need it to correctly parse received dates.
|
| + const base::Time current_time_;
|
| +
|
| std::queue<FtpDirectoryListingEntry> entries_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FtpDirectoryListingParserNetware);
|
|
|