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" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "base/sys_string_conversions.h" | 12 #include "base/sys_string_conversions.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "net/base/escape.h" | 14 #include "net/base/escape.h" |
15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
16 #include "net/base/net_util.h" | 16 #include "net/base/net_util.h" |
17 #include "net/ftp/ftp_directory_listing_parsers.h" | 17 #include "net/ftp/ftp_directory_listing_parsers.h" |
18 #include "net/ftp/ftp_server_type_histograms.h" | 18 #include "net/ftp/ftp_server_type_histograms.h" |
19 #include "unicode/ucsdet.h" | 19 #include "unicode/ucsdet.h" |
20 #include "webkit/api/public/WebURL.h" | 20 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" |
21 #include "webkit/api/public/WebURLLoaderClient.h" | 21 #include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h" |
22 | 22 |
23 using WebKit::WebURLLoader; | 23 using WebKit::WebURLLoader; |
24 using WebKit::WebURLLoaderClient; | 24 using WebKit::WebURLLoaderClient; |
25 using WebKit::WebURLResponse; | 25 using WebKit::WebURLResponse; |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 // A very simple-minded character encoding detection. | 29 // A very simple-minded character encoding detection. |
30 // TODO(jungshik): We can apply more heuristics here (e.g. using various hints | 30 // TODO(jungshik): We can apply more heuristics here (e.g. using various hints |
31 // like TLD, the UI language/default encoding of a client, etc). In that case, | 31 // like TLD, the UI language/default encoding of a client, etc). In that case, |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 299 |
300 void FtpDirectoryListingResponseDelegate::SendResponseBufferToClient() { | 300 void FtpDirectoryListingResponseDelegate::SendResponseBufferToClient() { |
301 if (!response_buffer_.empty()) { | 301 if (!response_buffer_.empty()) { |
302 client_->didReceiveData(loader_, response_buffer_.data(), | 302 client_->didReceiveData(loader_, response_buffer_.data(), |
303 response_buffer_.length()); | 303 response_buffer_.length()); |
304 response_buffer_.clear(); | 304 response_buffer_.clear(); |
305 } | 305 } |
306 } | 306 } |
307 | 307 |
308 } // namespace webkit_glue | 308 } // namespace webkit_glue |
OLD | NEW |