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

Side by Side Diff: net/ftp/ftp_directory_listing_parser_vms.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
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_vms.h" 5 #include "net/ftp/ftp_directory_listing_parser_vms.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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 } // namespace 162 } // namespace
163 163
164 namespace net { 164 namespace net {
165 165
166 FtpDirectoryListingParserVms::FtpDirectoryListingParserVms() 166 FtpDirectoryListingParserVms::FtpDirectoryListingParserVms()
167 : state_(STATE_INITIAL), 167 : state_(STATE_INITIAL),
168 last_is_directory_(false) { 168 last_is_directory_(false) {
169 } 169 }
170 170
171 FtpDirectoryListingParserVms::~FtpDirectoryListingParserVms() {}
172
171 bool FtpDirectoryListingParserVms::ConsumeLine(const string16& line) { 173 bool FtpDirectoryListingParserVms::ConsumeLine(const string16& line) {
172 switch (state_) { 174 switch (state_) {
173 case STATE_INITIAL: 175 case STATE_INITIAL:
174 DCHECK(last_filename_.empty()); 176 DCHECK(last_filename_.empty());
175 if (line.empty()) 177 if (line.empty())
176 return true; 178 return true;
177 if (StartsWith(line, ASCIIToUTF16("Total of "), true)) { 179 if (StartsWith(line, ASCIIToUTF16("Total of "), true)) {
178 state_ = STATE_END; 180 state_ = STATE_END;
179 return true; 181 return true;
180 } 182 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 if (entry.type != FtpDirectoryListingEntry::FILE) 291 if (entry.type != FtpDirectoryListingEntry::FILE)
290 entry.size = -1; 292 entry.size = -1;
291 if (!VmsDateListingToTime(columns, &entry.last_modified)) 293 if (!VmsDateListingToTime(columns, &entry.last_modified))
292 return false; 294 return false;
293 295
294 entries_.push(entry); 296 entries_.push(entry);
295 return true; 297 return true;
296 } 298 }
297 299
298 } // namespace net 300 } // namespace net
OLDNEW
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_vms.h ('k') | net/ftp/ftp_directory_listing_parser_windows.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698