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

Side by Side Diff: content/child/ftp_directory_listing_response_delegate.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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/child/ftp_directory_listing_response_delegate.h" 5 #include "content/child/ftp_directory_listing_response_delegate.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/i18n/icu_encoding_detection.h" 9 #include "base/i18n/icu_encoding_detection.h"
10 #include "base/i18n/icu_string_conversions.h" 10 #include "base/i18n/icu_string_conversions.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 #endif 87 #endif
88 if (rv != net::OK) { 88 if (rv != net::OK) {
89 SendDataToClient("<script>onListingParsingError();</script>\n"); 89 SendDataToClient("<script>onListingParsingError();</script>\n");
90 return; 90 return;
91 } 91 }
92 for (size_t i = 0; i < entries.size(); i++) { 92 for (size_t i = 0; i < entries.size(); i++) {
93 const FtpDirectoryListingEntry& entry = entries[i]; 93 const FtpDirectoryListingEntry& entry = entries[i];
94 94
95 // Skip the current and parent directory entries in the listing. Our header 95 // Skip the current and parent directory entries in the listing. Our header
96 // always includes them. 96 // always includes them.
97 if (EqualsASCII(entry.name, ".") || EqualsASCII(entry.name, "..")) 97 if (base::EqualsASCII(entry.name, ".") ||
98 base::EqualsASCII(entry.name, ".."))
98 continue; 99 continue;
99 100
100 bool is_directory = (entry.type == FtpDirectoryListingEntry::DIRECTORY); 101 bool is_directory = (entry.type == FtpDirectoryListingEntry::DIRECTORY);
101 int64 size = entry.size; 102 int64 size = entry.size;
102 if (entry.type != FtpDirectoryListingEntry::FILE) 103 if (entry.type != FtpDirectoryListingEntry::FILE)
103 size = 0; 104 size = 0;
104 SendDataToClient(net::GetDirectoryListingEntry( 105 SendDataToClient(net::GetDirectoryListingEntry(
105 entry.name, entry.raw_name, is_directory, size, entry.last_modified)); 106 entry.name, entry.raw_name, is_directory, size, entry.last_modified));
106 } 107 }
107 } 108 }
(...skipping 14 matching lines...) Expand all
122 } 123 }
123 } 124 }
124 125
125 void FtpDirectoryListingResponseDelegate::SendDataToClient( 126 void FtpDirectoryListingResponseDelegate::SendDataToClient(
126 const std::string& data) { 127 const std::string& data) {
127 if (client_) 128 if (client_)
128 client_->didReceiveData(loader_, data.data(), data.length(), -1); 129 client_->didReceiveData(loader_, data.data(), data.length(), -1);
129 } 130 }
130 131
131 } // namespace content 132 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/manifest/manifest_browsertest.cc ('k') | content/common/page_state_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698