OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/fileapi/file_writer_delegate.h" | 5 #include "webkit/fileapi/file_writer_delegate.h" |
6 | 6 |
7 #include "base/file_util_proxy.h" | 7 #include "base/file_util_proxy.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/threading/thread_restrictions.h" | 9 #include "base/threading/thread_restrictions.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
149 OnError(base::PLATFORM_FILE_ERROR_SECURITY); | 149 OnError(base::PLATFORM_FILE_ERROR_SECURITY); |
150 } | 150 } |
151 | 151 |
152 void FileWriterDelegate::OnCertificateRequested( | 152 void FileWriterDelegate::OnCertificateRequested( |
153 net::URLRequest* request, net::SSLCertRequestInfo* cert_request_info) { | 153 net::URLRequest* request, net::SSLCertRequestInfo* cert_request_info) { |
154 NOTREACHED(); | 154 NOTREACHED(); |
155 OnError(base::PLATFORM_FILE_ERROR_SECURITY); | 155 OnError(base::PLATFORM_FILE_ERROR_SECURITY); |
156 } | 156 } |
157 | 157 |
158 void FileWriterDelegate::OnSSLCertificateError( | 158 void FileWriterDelegate::OnSSLCertificateError( |
159 net::URLRequest* request, int cert_error, net::X509Certificate* cert) { | 159 net::URLRequest* request, int cert_error, const net::SSLInfo& ssl_info, |
160 bool must_be_fatal) { | |
wtc
2011/09/23 00:04:51
Probably should use the formatting style recommend
| |
160 NOTREACHED(); | 161 NOTREACHED(); |
161 OnError(base::PLATFORM_FILE_ERROR_SECURITY); | 162 OnError(base::PLATFORM_FILE_ERROR_SECURITY); |
162 } | 163 } |
163 | 164 |
164 void FileWriterDelegate::OnResponseStarted(net::URLRequest* request) { | 165 void FileWriterDelegate::OnResponseStarted(net::URLRequest* request) { |
165 DCHECK_EQ(request_, request); | 166 DCHECK_EQ(request_, request); |
166 // file_stream_->Seek() blocks the IO thread. | 167 // file_stream_->Seek() blocks the IO thread. |
167 // See http://crbug.com/75548. | 168 // See http://crbug.com/75548. |
168 base::ThreadRestrictions::ScopedAllowIO allow_io; | 169 base::ThreadRestrictions::ScopedAllowIO allow_io; |
169 if (!request->status().is_success()) { | 170 if (!request->status().is_success()) { |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
313 | 314 |
314 FileSystemQuotaUtil* FileWriterDelegate::quota_util() const { | 315 FileSystemQuotaUtil* FileWriterDelegate::quota_util() const { |
315 DCHECK(file_system_operation_); | 316 DCHECK(file_system_operation_); |
316 DCHECK(file_system_operation_->file_system_context()); | 317 DCHECK(file_system_operation_->file_system_context()); |
317 DCHECK(file_system_operation_->file_system_operation_context()); | 318 DCHECK(file_system_operation_->file_system_operation_context()); |
318 return file_system_operation_->file_system_context()->GetQuotaUtil( | 319 return file_system_operation_->file_system_context()->GetQuotaUtil( |
319 file_system_operation_context()->src_type()); | 320 file_system_operation_context()->src_type()); |
320 } | 321 } |
321 | 322 |
322 } // namespace fileapi | 323 } // namespace fileapi |
OLD | NEW |