OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_MOJO_ASYNC_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_MOJO_ASYNC_RESOURCE_HANDLER_H_ |
6 #define CONTENT_BROWSER_LOADER_MOJO_ASYNC_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_MOJO_ASYNC_RESOURCE_HANDLER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 bool OnRequestRedirected(const net::RedirectInfo& redirect_info, | 56 bool OnRequestRedirected(const net::RedirectInfo& redirect_info, |
57 ResourceResponse* response, | 57 ResourceResponse* response, |
58 bool* defer) override; | 58 bool* defer) override; |
59 bool OnResponseStarted(ResourceResponse* response, bool* defer) override; | 59 bool OnResponseStarted(ResourceResponse* response, bool* defer) override; |
60 bool OnWillStart(const GURL& url, bool* defer) override; | 60 bool OnWillStart(const GURL& url, bool* defer) override; |
61 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, | 61 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, |
62 int* buf_size, | 62 int* buf_size, |
63 int min_size) override; | 63 int min_size) override; |
64 bool OnReadCompleted(int bytes_read, bool* defer) override; | 64 bool OnReadCompleted(int bytes_read, bool* defer) override; |
65 void OnResponseCompleted(const net::URLRequestStatus& status, | 65 void OnResponseCompleted(const net::URLRequestStatus& status, |
66 const std::string& security_info, | |
67 bool* defer) override; | 66 bool* defer) override; |
68 void OnDataDownloaded(int bytes_downloaded) override; | 67 void OnDataDownloaded(int bytes_downloaded) override; |
69 | 68 |
70 // mojom::URLLoader implementation | 69 // mojom::URLLoader implementation |
71 void FollowRedirect() override; | 70 void FollowRedirect() override; |
72 void Cancel() override; | 71 void Cancel() override; |
73 | 72 |
74 void ResumeForTesting(); | 73 void ResumeForTesting(); |
75 static void SetAllocationSizeForTesting(size_t size); | 74 static void SetAllocationSizeForTesting(size_t size); |
76 static constexpr size_t kDefaultAllocationSize = 512 * 1024; | 75 static constexpr size_t kDefaultAllocationSize = 512 * 1024; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 size_t buffer_offset_ = 0; | 113 size_t buffer_offset_ = 0; |
115 size_t buffer_bytes_read_ = 0; | 114 size_t buffer_bytes_read_ = 0; |
116 scoped_refptr<SharedWriter> shared_writer_; | 115 scoped_refptr<SharedWriter> shared_writer_; |
117 | 116 |
118 DISALLOW_COPY_AND_ASSIGN(MojoAsyncResourceHandler); | 117 DISALLOW_COPY_AND_ASSIGN(MojoAsyncResourceHandler); |
119 }; | 118 }; |
120 | 119 |
121 } // namespace content | 120 } // namespace content |
122 | 121 |
123 #endif // CONTENT_BROWSER_LOADER_MOJO_ASYNC_RESOURCE_HANDLER_H_ | 122 #endif // CONTENT_BROWSER_LOADER_MOJO_ASYNC_RESOURCE_HANDLER_H_ |
OLD | NEW |