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

Side by Side Diff: net/ftp/ftp_directory_listing_parser_windows.h

Issue 6670085: FTP: Detect the character encoding only after the entire listing is received. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test coverage 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_
OLDNEW
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_vms_unittest.cc ('k') | net/ftp/ftp_directory_listing_parser_windows.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698