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

Side by Side Diff: net/ftp/ftp_directory_listing_buffer.cc

Issue 3448029: FTP: fix directory listing parser for ftp.usa.hp.com (Closed)
Patch Set: attempt to fix Windows trybots Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // source code is governed by a BSD-style license that can be found in the 2 // Use of this source code is governed by a BSD-style license that can be
3 // LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/ftp/ftp_directory_listing_buffer.h" 5 #include "net/ftp/ftp_directory_listing_buffer.h"
6 6
7 #include "base/i18n/icu_encoding_detection.h" 7 #include "base/i18n/icu_encoding_detection.h"
8 #include "base/i18n/icu_string_conversions.h" 8 #include "base/i18n/icu_string_conversions.h"
9 #include "base/stl_util-inl.h" 9 #include "base/stl_util-inl.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "net/base/net_errors.h" 11 #include "net/base/net_errors.h"
12 #include "net/ftp/ftp_directory_listing_parser_hprc.h"
12 #include "net/ftp/ftp_directory_listing_parser_ls.h" 13 #include "net/ftp/ftp_directory_listing_parser_ls.h"
13 #include "net/ftp/ftp_directory_listing_parser_mlsd.h" 14 #include "net/ftp/ftp_directory_listing_parser_mlsd.h"
14 #include "net/ftp/ftp_directory_listing_parser_netware.h" 15 #include "net/ftp/ftp_directory_listing_parser_netware.h"
15 #include "net/ftp/ftp_directory_listing_parser_vms.h" 16 #include "net/ftp/ftp_directory_listing_parser_vms.h"
16 #include "net/ftp/ftp_directory_listing_parser_windows.h" 17 #include "net/ftp/ftp_directory_listing_parser_windows.h"
17 18
18 namespace net { 19 namespace net {
19 20
20 FtpDirectoryListingBuffer::FtpDirectoryListingBuffer( 21 FtpDirectoryListingBuffer::FtpDirectoryListingBuffer(
21 const base::Time& current_time) 22 const base::Time& current_time)
22 : current_parser_(NULL) { 23 : current_parser_(NULL) {
24 parsers_.insert(new FtpDirectoryListingParserHprc(current_time));
23 parsers_.insert(new FtpDirectoryListingParserLs(current_time)); 25 parsers_.insert(new FtpDirectoryListingParserLs(current_time));
24 parsers_.insert(new FtpDirectoryListingParserMlsd()); 26 parsers_.insert(new FtpDirectoryListingParserMlsd());
25 parsers_.insert(new FtpDirectoryListingParserNetware(current_time)); 27 parsers_.insert(new FtpDirectoryListingParserNetware(current_time));
26 parsers_.insert(new FtpDirectoryListingParserVms()); 28 parsers_.insert(new FtpDirectoryListingParserVms());
27 parsers_.insert(new FtpDirectoryListingParserWindows()); 29 parsers_.insert(new FtpDirectoryListingParserWindows());
28 } 30 }
29 31
30 FtpDirectoryListingBuffer::~FtpDirectoryListingBuffer() { 32 FtpDirectoryListingBuffer::~FtpDirectoryListingBuffer() {
31 STLDeleteElements(&parsers_); 33 STLDeleteElements(&parsers_);
32 } 34 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 return OK; 164 return OK;
163 165
164 return ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT; 166 return ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT;
165 } 167 }
166 168
167 current_parser_ = *parsers_.begin(); 169 current_parser_ = *parsers_.begin();
168 return OK; 170 return OK;
169 } 171 }
170 172
171 } // namespace net 173 } // namespace net
OLDNEW
« no previous file with comments | « net/data/ftp/dir-listing-hprc-3.expected ('k') | net/ftp/ftp_directory_listing_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698