| 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 #ifndef WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ | 6 #define WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 virtual void OnReceivedRedirect(net::URLRequest* request, | 38 virtual void OnReceivedRedirect(net::URLRequest* request, |
| 39 const GURL& new_url, | 39 const GURL& new_url, |
| 40 bool* defer_redirect) OVERRIDE; | 40 bool* defer_redirect) OVERRIDE; |
| 41 virtual void OnAuthRequired(net::URLRequest* request, | 41 virtual void OnAuthRequired(net::URLRequest* request, |
| 42 net::AuthChallengeInfo* auth_info) OVERRIDE; | 42 net::AuthChallengeInfo* auth_info) OVERRIDE; |
| 43 virtual void OnCertificateRequested( | 43 virtual void OnCertificateRequested( |
| 44 net::URLRequest* request, | 44 net::URLRequest* request, |
| 45 net::SSLCertRequestInfo* cert_request_info) OVERRIDE; | 45 net::SSLCertRequestInfo* cert_request_info) OVERRIDE; |
| 46 virtual void OnSSLCertificateError(net::URLRequest* request, | 46 virtual void OnSSLCertificateError(net::URLRequest* request, |
| 47 const net::SSLInfo& ssl_info, | 47 const net::SSLInfo& ssl_info, |
| 48 bool is_hsts_host) OVERRIDE; | 48 bool fatal) OVERRIDE; |
| 49 virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE; | 49 virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE; |
| 50 virtual void OnReadCompleted(net::URLRequest* request, | 50 virtual void OnReadCompleted(net::URLRequest* request, |
| 51 int bytes_read) OVERRIDE; | 51 int bytes_read) OVERRIDE; |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 void OnGetFileInfoAndCallStartUpdate( | 54 void OnGetFileInfoAndCallStartUpdate( |
| 55 base::PlatformFileError error, | 55 base::PlatformFileError error, |
| 56 const base::PlatformFileInfo& file_info); | 56 const base::PlatformFileInfo& file_info); |
| 57 void Read(); | 57 void Read(); |
| 58 void OnDataReceived(int bytes_read); | 58 void OnDataReceived(int bytes_read); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 77 int64 allowed_bytes_to_write_; | 77 int64 allowed_bytes_to_write_; |
| 78 scoped_refptr<net::IOBufferWithSize> io_buffer_; | 78 scoped_refptr<net::IOBufferWithSize> io_buffer_; |
| 79 scoped_ptr<net::FileStream> file_stream_; | 79 scoped_ptr<net::FileStream> file_stream_; |
| 80 net::URLRequest* request_; | 80 net::URLRequest* request_; |
| 81 base::WeakPtrFactory<FileWriterDelegate> weak_factory_; | 81 base::WeakPtrFactory<FileWriterDelegate> weak_factory_; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } // namespace fileapi | 84 } // namespace fileapi |
| 85 | 85 |
| 86 #endif // WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ | 86 #endif // WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ |
| OLD | NEW |