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

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

Issue 3814013: FBTF: Monster ctor patch after changing heuristics in clang plugin. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: More add file fail 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 | Annotate | Revision Log
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_ls.h ('k') | net/ftp/ftp_directory_listing_parser_mlsd.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "net/ftp/ftp_directory_listing_parser_ls.h" 5 #include "net/ftp/ftp_directory_listing_parser_ls.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 namespace net { 83 namespace net {
84 84
85 FtpDirectoryListingParserLs::FtpDirectoryListingParserLs( 85 FtpDirectoryListingParserLs::FtpDirectoryListingParserLs(
86 const base::Time& current_time) 86 const base::Time& current_time)
87 : received_nonempty_line_(false), 87 : received_nonempty_line_(false),
88 received_total_line_(false), 88 received_total_line_(false),
89 current_time_(current_time) { 89 current_time_(current_time) {
90 } 90 }
91 91
92 FtpDirectoryListingParserLs::~FtpDirectoryListingParserLs() {}
93
92 bool FtpDirectoryListingParserLs::ConsumeLine(const string16& line) { 94 bool FtpDirectoryListingParserLs::ConsumeLine(const string16& line) {
93 if (line.empty() && !received_nonempty_line_) { 95 if (line.empty() && !received_nonempty_line_) {
94 // Allow empty lines only at the beginning of the listing. For example VMS 96 // Allow empty lines only at the beginning of the listing. For example VMS
95 // systems in Unix emulation mode add an empty line before the first listing 97 // systems in Unix emulation mode add an empty line before the first listing
96 // entry. 98 // entry.
97 return true; 99 return true;
98 } 100 }
99 received_nonempty_line_ = true; 101 received_nonempty_line_ = true;
100 102
101 std::vector<string16> columns; 103 std::vector<string16> columns;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 return !entries_.empty(); 186 return !entries_.empty();
185 } 187 }
186 188
187 FtpDirectoryListingEntry FtpDirectoryListingParserLs::PopEntry() { 189 FtpDirectoryListingEntry FtpDirectoryListingParserLs::PopEntry() {
188 FtpDirectoryListingEntry entry = entries_.front(); 190 FtpDirectoryListingEntry entry = entries_.front();
189 entries_.pop(); 191 entries_.pop();
190 return entry; 192 return entry;
191 } 193 }
192 194
193 } // namespace net 195 } // namespace net
OLDNEW
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_ls.h ('k') | net/ftp/ftp_directory_listing_parser_mlsd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698