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

Side by Side Diff: webkit/glue/ftp_directory_listing_response_delegate.cc

Issue 1120012: Fix the "ls -l" style date parser to correctly guess the year if it is not provided. (Closed)
Patch Set: better comments Created 10 years, 9 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
« no previous file with comments | « net/ftp/ftp_util_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/ftp/ftp_util_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698