OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // If this isn't top level directory (i.e. the path isn't "/",) | 122 // If this isn't top level directory (i.e. the path isn't "/",) |
123 // add a link to the parent directory. | 123 // add a link to the parent directory. |
124 if (response_url.path().length() > 1) { | 124 if (response_url.path().length() > 1) { |
125 SendDataToClient(net::GetDirectoryListingEntry( | 125 SendDataToClient(net::GetDirectoryListingEntry( |
126 base::ASCIIToUTF16(".."), std::string(), false, 0, base::Time())); | 126 base::ASCIIToUTF16(".."), std::string(), false, 0, base::Time())); |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 void FtpDirectoryListingResponseDelegate::SendDataToClient( | 130 void FtpDirectoryListingResponseDelegate::SendDataToClient( |
131 const std::string& data) { | 131 const std::string& data) { |
132 if (client_) | 132 if (client_) { |
133 client_->didReceiveData(loader_, data.data(), data.length(), -1); | 133 client_->didReceiveData(loader_, data.data(), data.length(), -1, |
| 134 data.length()); |
| 135 } |
134 } | 136 } |
135 | 137 |
136 } // namespace content | 138 } // namespace content |
OLD | NEW |