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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: net/ftp/ftp_directory_listing_parser_windows.h
diff --git a/net/ftp/ftp_directory_listing_parser_windows.h b/net/ftp/ftp_directory_listing_parser_windows.h
index 1f029afb58f441158dc81aecf40a62679f679394..581e08cf4f3087c21362d147c8db2dfabbb1e72a 100644
--- a/net/ftp/ftp_directory_listing_parser_windows.h
+++ b/net/ftp/ftp_directory_listing_parser_windows.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,29 +6,18 @@
#define NET_FTP_FTP_DIRECTORY_LISTING_PARSER_WINDOWS_H_
#pragma once
-#include <queue>
+#include <vector>
-#include "net/ftp/ftp_directory_listing_parser.h"
+#include "base/string16.h"
namespace net {
-class FtpDirectoryListingParserWindows : public FtpDirectoryListingParser {
- public:
- FtpDirectoryListingParserWindows();
- virtual ~FtpDirectoryListingParserWindows();
+struct FtpDirectoryListingEntry;
- // FtpDirectoryListingParser methods:
- virtual FtpServerType GetServerType() const;
- virtual bool ConsumeLine(const string16& line);
- virtual bool OnEndOfInput();
- virtual bool EntryAvailable() const;
- virtual FtpDirectoryListingEntry PopEntry();
-
- private:
- std::queue<FtpDirectoryListingEntry> entries_;
-
- DISALLOW_COPY_AND_ASSIGN(FtpDirectoryListingParserWindows);
-};
+// Parses Windows FTP directory listing. Returns true on success.
+bool ParseFtpDirectoryListingWindows(
+ const std::vector<string16>& lines,
+ std::vector<FtpDirectoryListingEntry>* entries);
} // namespace net
« 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