| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "webkit/glue/ftp_directory_listing_response_delegate.h" | 5 #include "webkit/glue/ftp_directory_listing_response_delegate.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/i18n/icu_string_conversions.h" | 9 #include "base/i18n/icu_string_conversions.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 namespace webkit_glue { | 72 namespace webkit_glue { |
| 73 | 73 |
| 74 FtpDirectoryListingResponseDelegate::FtpDirectoryListingResponseDelegate( | 74 FtpDirectoryListingResponseDelegate::FtpDirectoryListingResponseDelegate( |
| 75 WebURLLoaderClient* client, | 75 WebURLLoaderClient* client, |
| 76 WebURLLoader* loader, | 76 WebURLLoader* loader, |
| 77 const WebURLResponse& response) | 77 const WebURLResponse& response) |
| 78 : client_(client), | 78 : client_(client), |
| 79 loader_(loader), | 79 loader_(loader), |
| 80 original_response_(response), | 80 original_response_(response), |
| 81 buffer_(base::Time::Now()), |
| 81 updated_histograms_(false), | 82 updated_histograms_(false), |
| 82 had_parsing_error_(false) { | 83 had_parsing_error_(false) { |
| 83 Init(); | 84 Init(); |
| 84 } | 85 } |
| 85 | 86 |
| 86 void FtpDirectoryListingResponseDelegate::OnReceivedData(const char* data, | 87 void FtpDirectoryListingResponseDelegate::OnReceivedData(const char* data, |
| 87 int data_len) { | 88 int data_len) { |
| 88 if (had_parsing_error_) | 89 if (had_parsing_error_) |
| 89 return; | 90 return; |
| 90 | 91 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 entry.name, std::string(), is_directory, size, entry.last_modified)); | 161 entry.name, std::string(), is_directory, size, entry.last_modified)); |
| 161 } | 162 } |
| 162 } | 163 } |
| 163 | 164 |
| 164 void FtpDirectoryListingResponseDelegate::SendDataToClient( | 165 void FtpDirectoryListingResponseDelegate::SendDataToClient( |
| 165 const std::string& data) { | 166 const std::string& data) { |
| 166 client_->didReceiveData(loader_, data.data(), data.length()); | 167 client_->didReceiveData(loader_, data.data(), data.length()); |
| 167 } | 168 } |
| 168 | 169 |
| 169 } // namespace webkit_glue | 170 } // namespace webkit_glue |
| OLD | NEW |