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

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

Issue 1176583003: Move EqualsASCII to the base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util2
Patch Set: Created 5 years, 6 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
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_vms.cc ('k') | net/ftp/ftp_util.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 19 matching lines...) Expand all
30 // 1. date 30 // 1. date
31 // 2. time 31 // 2. time
32 // 3. size in bytes (or "<DIR>" for directories) 32 // 3. size in bytes (or "<DIR>" for directories)
33 // 4. filename (may be empty or contain spaces) 33 // 4. filename (may be empty or contain spaces)
34 // 34 //
35 // For now, make sure we have 1-3, and handle 4 later. 35 // For now, make sure we have 1-3, and handle 4 later.
36 if (columns.size() < 3) 36 if (columns.size() < 3)
37 return false; 37 return false;
38 38
39 FtpDirectoryListingEntry entry; 39 FtpDirectoryListingEntry entry;
40 if (EqualsASCII(columns[2], "<DIR>")) { 40 if (base::EqualsASCII(columns[2], "<DIR>")) {
41 entry.type = FtpDirectoryListingEntry::DIRECTORY; 41 entry.type = FtpDirectoryListingEntry::DIRECTORY;
42 entry.size = -1; 42 entry.size = -1;
43 } else { 43 } else {
44 entry.type = FtpDirectoryListingEntry::FILE; 44 entry.type = FtpDirectoryListingEntry::FILE;
45 if (!base::StringToInt64(columns[2], &entry.size)) 45 if (!base::StringToInt64(columns[2], &entry.size))
46 return false; 46 return false;
47 if (entry.size < 0) 47 if (entry.size < 0)
48 return false; 48 return false;
49 } 49 }
50 50
(...skipping 12 matching lines...) Expand all
63 continue; 63 continue;
64 } 64 }
65 65
66 entries->push_back(entry); 66 entries->push_back(entry);
67 } 67 }
68 68
69 return true; 69 return true;
70 } 70 }
71 71
72 } // namespace net 72 } // namespace net
OLDNEW
« no previous file with comments | « net/ftp/ftp_directory_listing_parser_vms.cc ('k') | net/ftp/ftp_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698