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

Side by Side Diff: net/ftp/ftp_directory_listing_parser_netware.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_netware.h" 5 #include "net/ftp/ftp_directory_listing_parser_netware.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 22 matching lines...) Expand all
33 } // namespace 33 } // namespace
34 34
35 namespace net { 35 namespace net {
36 36
37 FtpDirectoryListingParserNetware::FtpDirectoryListingParserNetware( 37 FtpDirectoryListingParserNetware::FtpDirectoryListingParserNetware(
38 const base::Time& current_time) 38 const base::Time& current_time)
39 : received_first_line_(false), 39 : received_first_line_(false),
40 current_time_(current_time) { 40 current_time_(current_time) {
41 } 41 }
42 42
43 FtpDirectoryListingParserNetware::~FtpDirectoryListingParserNetware() {}
44
43 bool FtpDirectoryListingParserNetware::ConsumeLine(const string16& line) { 45 bool FtpDirectoryListingParserNetware::ConsumeLine(const string16& line) {
44 if (!received_first_line_) { 46 if (!received_first_line_) {
45 received_first_line_ = true; 47 received_first_line_ = true;
46 48
47 return StartsWith(line, ASCIIToUTF16("total "), true); 49 return StartsWith(line, ASCIIToUTF16("total "), true);
48 } 50 }
49 51
50 std::vector<string16> columns; 52 std::vector<string16> columns;
51 base::SplitString(CollapseWhitespace(line, false), ' ', &columns); 53 base::SplitString(CollapseWhitespace(line, false), ' ', &columns);
52 54
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 return !entries_.empty(); 100 return !entries_.empty();
99 } 101 }
100 102
101 FtpDirectoryListingEntry FtpDirectoryListingParserNetware::PopEntry() { 103 FtpDirectoryListingEntry FtpDirectoryListingParserNetware::PopEntry() {
102 FtpDirectoryListingEntry entry = entries_.front(); 104 FtpDirectoryListingEntry entry = entries_.front();
103 entries_.pop(); 105 entries_.pop();
104 return entry; 106 return entry;
105 } 107 }
106 108
107 } // namespace net 109 } // namespace net
OLDNEW
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_netware.h ('k') | net/ftp/ftp_directory_listing_parser_vms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698