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

Side by Side Diff: net/ftp/ftp_directory_listing_parser_windows.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_windows.h ('k') | net/ftp/ftp_network_session.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_windows.h" 5 #include "net/ftp/ftp_directory_listing_parser_windows.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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // We don't know the time zone of the server, so just use local time. 66 // We don't know the time zone of the server, so just use local time.
67 *time = base::Time::FromLocalExploded(time_exploded); 67 *time = base::Time::FromLocalExploded(time_exploded);
68 return true; 68 return true;
69 } 69 }
70 70
71 } // namespace 71 } // namespace
72 72
73 namespace net { 73 namespace net {
74 74
75 FtpDirectoryListingParserWindows::FtpDirectoryListingParserWindows() { 75 FtpDirectoryListingParserWindows::FtpDirectoryListingParserWindows() {}
76 } 76
77 FtpDirectoryListingParserWindows::~FtpDirectoryListingParserWindows() {}
77 78
78 bool FtpDirectoryListingParserWindows::ConsumeLine(const string16& line) { 79 bool FtpDirectoryListingParserWindows::ConsumeLine(const string16& line) {
79 std::vector<string16> columns; 80 std::vector<string16> columns;
80 base::SplitString(CollapseWhitespace(line, false), ' ', &columns); 81 base::SplitString(CollapseWhitespace(line, false), ' ', &columns);
81 82
82 // We may receive file names containing spaces, which can make the number of 83 // We may receive file names containing spaces, which can make the number of
83 // columns arbitrarily large. We will handle that later. For now just make 84 // columns arbitrarily large. We will handle that later. For now just make
84 // sure we have all the columns that should normally be there. 85 // sure we have all the columns that should normally be there.
85 if (columns.size() < 4) 86 if (columns.size() < 4)
86 return false; 87 return false;
(...skipping 27 matching lines...) Expand all
114 return !entries_.empty(); 115 return !entries_.empty();
115 } 116 }
116 117
117 FtpDirectoryListingEntry FtpDirectoryListingParserWindows::PopEntry() { 118 FtpDirectoryListingEntry FtpDirectoryListingParserWindows::PopEntry() {
118 FtpDirectoryListingEntry entry = entries_.front(); 119 FtpDirectoryListingEntry entry = entries_.front();
119 entries_.pop(); 120 entries_.pop();
120 return entry; 121 return entry;
121 } 122 }
122 123
123 } // namespace net 124 } // namespace net
OLDNEW
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_windows.h ('k') | net/ftp/ftp_network_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698