OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 STORAGE_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ | 5 #ifndef STORAGE_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ |
6 #define STORAGE_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ | 6 #define STORAGE_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 const net::RedirectInfo& redirect_info, | 54 const net::RedirectInfo& redirect_info, |
55 bool* defer_redirect) override; | 55 bool* defer_redirect) override; |
56 void OnAuthRequired(net::URLRequest* request, | 56 void OnAuthRequired(net::URLRequest* request, |
57 net::AuthChallengeInfo* auth_info) override; | 57 net::AuthChallengeInfo* auth_info) override; |
58 void OnCertificateRequested( | 58 void OnCertificateRequested( |
59 net::URLRequest* request, | 59 net::URLRequest* request, |
60 net::SSLCertRequestInfo* cert_request_info) override; | 60 net::SSLCertRequestInfo* cert_request_info) override; |
61 void OnSSLCertificateError(net::URLRequest* request, | 61 void OnSSLCertificateError(net::URLRequest* request, |
62 const net::SSLInfo& ssl_info, | 62 const net::SSLInfo& ssl_info, |
63 bool fatal) override; | 63 bool fatal) override; |
64 void OnResponseStarted(net::URLRequest* request) override; | 64 void OnResponseStarted(net::URLRequest* request, int net_error) override; |
65 void OnReadCompleted(net::URLRequest* request, int bytes_read) override; | 65 void OnReadCompleted(net::URLRequest* request, int bytes_read) override; |
66 | 66 |
67 private: | 67 private: |
68 void OnGetFileInfoAndStartRequest(std::unique_ptr<net::URLRequest> request, | 68 void OnGetFileInfoAndStartRequest(std::unique_ptr<net::URLRequest> request, |
69 base::File::Error error, | 69 base::File::Error error, |
70 const base::File::Info& file_info); | 70 const base::File::Info& file_info); |
71 void Read(); | 71 void Read(); |
72 void OnDataReceived(int bytes_read); | 72 void OnDataReceived(int bytes_read); |
73 void Write(); | 73 void Write(); |
74 void OnDataWritten(int write_response); | 74 void OnDataWritten(int write_response); |
(...skipping 23 matching lines...) Expand all Loading... |
98 std::unique_ptr<net::URLRequest> request_; | 98 std::unique_ptr<net::URLRequest> request_; |
99 | 99 |
100 base::WeakPtrFactory<FileWriterDelegate> weak_factory_; | 100 base::WeakPtrFactory<FileWriterDelegate> weak_factory_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(FileWriterDelegate); | 102 DISALLOW_COPY_AND_ASSIGN(FileWriterDelegate); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace storage | 105 } // namespace storage |
106 | 106 |
107 #endif // STORAGE_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ | 107 #endif // STORAGE_BROWSER_FILEAPI_FILE_WRITER_DELEGATE_H_ |
OLD | NEW |