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

Side by Side Diff: net/ftp/ftp_util.h

Issue 7590011: FTP: add directory listing parser for OS/2 format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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) 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 #ifndef NET_FTP_FTP_UTIL_H_ 5 #ifndef NET_FTP_FTP_UTIL_H_
6 #define NET_FTP_FTP_UTIL_H_ 6 #define NET_FTP_FTP_UTIL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 25 matching lines...) Expand all
36 // Converts a "ls -l" date listing to time. The listing comes in three 36 // Converts a "ls -l" date listing to time. The listing comes in three
37 // columns. The first one contains month, the second one contains day 37 // columns. The first one contains month, the second one contains day
38 // of month. The third one is either a time (and then we guess the year based 38 // of month. The third one is either a time (and then we guess the year based
39 // on |current_time|), or is a year (and then we don't know the time). 39 // on |current_time|), or is a year (and then we don't know the time).
40 static bool LsDateListingToTime(const string16& month, 40 static bool LsDateListingToTime(const string16& month,
41 const string16& day, 41 const string16& day,
42 const string16& rest, 42 const string16& rest,
43 const base::Time& current_time, 43 const base::Time& current_time,
44 base::Time* result); 44 base::Time* result);
45 45
46 // Converts a Windows date listing to time. Returns true on success.
47 static bool WindowsDateListingToTime(const string16& date,
48 const string16& time,
49 base::Time* result);
50
46 // Skips |columns| columns from |text| (whitespace-delimited), and returns the 51 // Skips |columns| columns from |text| (whitespace-delimited), and returns the
47 // remaining part, without leading/trailing whitespace. 52 // remaining part, without leading/trailing whitespace.
48 static string16 GetStringPartAfterColumns(const string16& text, int columns); 53 static string16 GetStringPartAfterColumns(const string16& text, int columns);
49 }; 54 };
50 55
51 } // namespace net 56 } // namespace net
52 57
53 #endif // NET_FTP_FTP_UTIL_H_ 58 #endif // NET_FTP_FTP_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698