| 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 48aebfcb3f8ec8c37ba7cba94917e93e8e4f27e6..b72a49f05981c82e11b1b519f1439cfb036c1863 100644
|
| --- a/net/ftp/ftp_directory_listing_parser_netware.h
|
| +++ b/net/ftp/ftp_directory_listing_parser_netware.h
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -6,40 +6,23 @@
|
| #define NET_FTP_FTP_DIRECTORY_LISTING_PARSER_NETWARE_H_
|
| #pragma once
|
|
|
| -#include <queue>
|
| +#include <vector>
|
|
|
| -#include "base/time.h"
|
| -#include "net/ftp/ftp_directory_listing_parser.h"
|
| +#include "base/string16.h"
|
| +
|
| +namespace base {
|
| +class Time;
|
| +}
|
|
|
| namespace net {
|
|
|
| -// Parser for Netware-style directory listing.
|
| -class FtpDirectoryListingParserNetware : public FtpDirectoryListingParser {
|
| - public:
|
| - // 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);
|
| - virtual ~FtpDirectoryListingParserNetware();
|
| -
|
| - // FtpDirectoryListingParser methods:
|
| - virtual FtpServerType GetServerType() const;
|
| - virtual bool ConsumeLine(const string16& line);
|
| - virtual bool OnEndOfInput();
|
| - virtual bool EntryAvailable() const;
|
| - virtual FtpDirectoryListingEntry PopEntry();
|
| -
|
| - private:
|
| - // 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);
|
| -};
|
| +struct FtpDirectoryListingEntry;
|
| +
|
| +// Parses Netware FTP directory listing. Returns true on success.
|
| +bool ParseFtpDirectoryListingNetware(
|
| + const std::vector<string16>& lines,
|
| + const base::Time& current_time,
|
| + std::vector<FtpDirectoryListingEntry>* entries);
|
|
|
| } // namespace net
|
|
|
|
|