| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_FTP_FTP_DIRECTORY_LISTING_PARSER_WINDOWS_H_ | 5 #ifndef NET_FTP_FTP_DIRECTORY_LISTING_PARSER_WINDOWS_H_ |
| 6 #define NET_FTP_FTP_DIRECTORY_LISTING_PARSER_WINDOWS_H_ | 6 #define NET_FTP_FTP_DIRECTORY_LISTING_PARSER_WINDOWS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <queue> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "net/ftp/ftp_directory_listing_parser.h" | 11 #include "base/string16.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 class FtpDirectoryListingParserWindows : public FtpDirectoryListingParser { | 15 struct FtpDirectoryListingEntry; |
| 16 public: | |
| 17 FtpDirectoryListingParserWindows(); | |
| 18 virtual ~FtpDirectoryListingParserWindows(); | |
| 19 | 16 |
| 20 // FtpDirectoryListingParser methods: | 17 // Parses Windows FTP directory listing. Returns true on success. |
| 21 virtual FtpServerType GetServerType() const; | 18 bool ParseFtpDirectoryListingWindows( |
| 22 virtual bool ConsumeLine(const string16& line); | 19 const std::vector<string16>& lines, |
| 23 virtual bool OnEndOfInput(); | 20 std::vector<FtpDirectoryListingEntry>* entries); |
| 24 virtual bool EntryAvailable() const; | |
| 25 virtual FtpDirectoryListingEntry PopEntry(); | |
| 26 | |
| 27 private: | |
| 28 std::queue<FtpDirectoryListingEntry> entries_; | |
| 29 | |
| 30 DISALLOW_COPY_AND_ASSIGN(FtpDirectoryListingParserWindows); | |
| 31 }; | |
| 32 | 21 |
| 33 } // namespace net | 22 } // namespace net |
| 34 | 23 |
| 35 #endif // NET_FTP_FTP_DIRECTORY_LISTING_PARSER_WINDOWS_H_ | 24 #endif // NET_FTP_FTP_DIRECTORY_LISTING_PARSER_WINDOWS_H_ |
| OLD | NEW |