| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 // Create a new buffer to store received data. | 45 // Create a new buffer to store received data. |
| 46 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, | 46 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
| 47 int* buf_size, | 47 int* buf_size, |
| 48 int min_size) override; | 48 int min_size) override; |
| 49 | 49 |
| 50 // A read was completed, forward the data to the Stream. | 50 // A read was completed, forward the data to the Stream. |
| 51 bool OnReadCompleted(int bytes_read, bool* defer) override; | 51 bool OnReadCompleted(int bytes_read, bool* defer) override; |
| 52 | 52 |
| 53 void OnResponseCompleted(const net::URLRequestStatus& status, | 53 void OnResponseCompleted(const net::URLRequestStatus& status, |
| 54 const std::string& sec_info, | |
| 55 bool* defer) override; | 54 bool* defer) override; |
| 56 | 55 |
| 57 void OnDataDownloaded(int bytes_downloaded) override; | 56 void OnDataDownloaded(int bytes_downloaded) override; |
| 58 | 57 |
| 59 Stream* stream() { return writer_.stream(); } | 58 Stream* stream() { return writer_.stream(); } |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 StreamWriter writer_; | 61 StreamWriter writer_; |
| 63 | 62 |
| 64 DISALLOW_COPY_AND_ASSIGN(StreamResourceHandler); | 63 DISALLOW_COPY_AND_ASSIGN(StreamResourceHandler); |
| 65 }; | 64 }; |
| 66 | 65 |
| 67 } // namespace content | 66 } // namespace content |
| 68 | 67 |
| 69 #endif // CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ | 68 #endif // CONTENT_BROWSER_LOADER_STREAM_RESOURCE_HANDLER_H_ |
| OLD | NEW |