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

Unified Diff: net/ftp/ftp_directory_listing_parser.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: net/ftp/ftp_directory_listing_parser.cc
diff --git a/net/ftp/ftp_directory_listing_parser.cc b/net/ftp/ftp_directory_listing_parser.cc
index d19e4a2c9fe4b9b82551a25af4452aac4e8ce561..3e013cf349227d299b29220b5246bbd1bcd288cd 100644
--- a/net/ftp/ftp_directory_listing_parser.cc
+++ b/net/ftp/ftp_directory_listing_parser.cc
@@ -29,7 +29,8 @@ namespace {
int FillInRawName(const std::string& encoding,
std::vector<FtpDirectoryListingEntry>* entries) {
for (size_t i = 0; i < entries->size(); i++) {
- if (!base::UTF16ToCodepage(entries->at(i).name, encoding.c_str(),
+ if (!base::UTF16ToCodepage(entries->at(i).name,
+ encoding.c_str(),
base::OnStringConversionError::FAIL,
&entries->at(i).raw_name)) {
return ERR_ENCODING_CONVERSION_FAILED;
@@ -54,28 +55,15 @@ int ParseListing(const base::string16& text,
base::Callback<bool(void)> callback;
FtpServerType server_type;
} parsers[] = {
- {
- base::Bind(&ParseFtpDirectoryListingLs, lines, current_time, entries),
- SERVER_LS
- },
- {
- base::Bind(&ParseFtpDirectoryListingWindows, lines, entries),
- SERVER_WINDOWS
- },
- {
- base::Bind(&ParseFtpDirectoryListingVms, lines, entries),
- SERVER_VMS
- },
- {
- base::Bind(&ParseFtpDirectoryListingNetware,
- lines, current_time, entries),
- SERVER_NETWARE
- },
- {
- base::Bind(&ParseFtpDirectoryListingOS2, lines, entries),
- SERVER_OS2
- }
- };
+ {base::Bind(&ParseFtpDirectoryListingLs, lines, current_time, entries),
+ SERVER_LS},
+ {base::Bind(&ParseFtpDirectoryListingWindows, lines, entries),
+ SERVER_WINDOWS},
+ {base::Bind(&ParseFtpDirectoryListingVms, lines, entries), SERVER_VMS},
+ {base::Bind(
+ &ParseFtpDirectoryListingNetware, lines, current_time, entries),
+ SERVER_NETWARE},
+ {base::Bind(&ParseFtpDirectoryListingOS2, lines, entries), SERVER_OS2}};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(parsers); i++) {
entries->clear();
@@ -95,7 +83,7 @@ int DecodeAndParse(const std::string& text,
const base::Time& current_time,
std::vector<FtpDirectoryListingEntry>* entries,
FtpServerType* server_type) {
- const char* kNewlineSeparators[] = { "\n", "\r\n" };
+ const char* kNewlineSeparators[] = {"\n", "\r\n"};
std::vector<std::string> encodings;
if (!base::DetectAllEncodings(text, &encodings))
@@ -128,9 +116,7 @@ int DecodeAndParse(const std::string& text,
} // namespace
-FtpDirectoryListingEntry::FtpDirectoryListingEntry()
- : type(UNKNOWN),
- size(-1) {
+FtpDirectoryListingEntry::FtpDirectoryListingEntry() : type(UNKNOWN), size(-1) {
}
int ParseFtpDirectoryListing(const std::string& text,

Powered by Google App Engine
This is Rietveld 408576698