| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "content/browser/loader/resource_handler.h" | 16 #include "content/browser/loader/resource_handler.h" |
| 17 #include "content/browser/loader/upload_progress_tracker.h" | 17 #include "content/browser/loader/upload_progress_tracker.h" |
| 18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
| 19 #include "content/common/url_loader.mojom.h" | 19 #include "content/common/url_loader.mojom.h" |
| 20 #include "content/public/common/resource_type.h" | 20 #include "content/public/common/resource_type.h" |
| 21 #include "mojo/public/cpp/bindings/associated_binding.h" | 21 #include "mojo/public/cpp/bindings/associated_binding.h" |
| 22 #include "mojo/public/cpp/system/data_pipe.h" | 22 #include "mojo/public/cpp/system/data_pipe.h" |
| 23 #include "mojo/public/cpp/system/watcher.h" | 23 #include "mojo/public/cpp/system/simple_watcher.h" |
| 24 #include "net/base/io_buffer.h" | 24 #include "net/base/io_buffer.h" |
| 25 #include "net/base/request_priority.h" | 25 #include "net/base/request_priority.h" |
| 26 | 26 |
| 27 class GURL; | 27 class GURL; |
| 28 | 28 |
| 29 namespace tracked_objects { | 29 namespace tracked_objects { |
| 30 class Location; | 30 class Location; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace net { | 33 namespace net { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 mojo::AssociatedBinding<mojom::URLLoader> binding_; | 130 mojo::AssociatedBinding<mojom::URLLoader> binding_; |
| 131 | 131 |
| 132 bool has_checked_for_sufficient_resources_ = false; | 132 bool has_checked_for_sufficient_resources_ = false; |
| 133 bool sent_received_response_message_ = false; | 133 bool sent_received_response_message_ = false; |
| 134 bool is_using_io_buffer_not_from_writer_ = false; | 134 bool is_using_io_buffer_not_from_writer_ = false; |
| 135 bool did_defer_on_writing_ = false; | 135 bool did_defer_on_writing_ = false; |
| 136 bool did_defer_on_redirect_ = false; | 136 bool did_defer_on_redirect_ = false; |
| 137 base::TimeTicks response_started_ticks_; | 137 base::TimeTicks response_started_ticks_; |
| 138 int64_t reported_total_received_bytes_ = 0; | 138 int64_t reported_total_received_bytes_ = 0; |
| 139 | 139 |
| 140 mojo::Watcher handle_watcher_; | 140 mojo::SimpleWatcher handle_watcher_; |
| 141 std::unique_ptr<mojom::URLLoader> url_loader_; | 141 std::unique_ptr<mojom::URLLoader> url_loader_; |
| 142 mojom::URLLoaderClientPtr url_loader_client_; | 142 mojom::URLLoaderClientPtr url_loader_client_; |
| 143 scoped_refptr<net::IOBufferWithSize> buffer_; | 143 scoped_refptr<net::IOBufferWithSize> buffer_; |
| 144 size_t buffer_offset_ = 0; | 144 size_t buffer_offset_ = 0; |
| 145 size_t buffer_bytes_read_ = 0; | 145 size_t buffer_bytes_read_ = 0; |
| 146 scoped_refptr<SharedWriter> shared_writer_; | 146 scoped_refptr<SharedWriter> shared_writer_; |
| 147 mojo::ScopedDataPipeConsumerHandle response_body_consumer_handle_; | 147 mojo::ScopedDataPipeConsumerHandle response_body_consumer_handle_; |
| 148 | 148 |
| 149 std::unique_ptr<UploadProgressTracker> upload_progress_tracker_; | 149 std::unique_ptr<UploadProgressTracker> upload_progress_tracker_; |
| 150 | 150 |
| 151 base::WeakPtrFactory<MojoAsyncResourceHandler> weak_factory_; | 151 base::WeakPtrFactory<MojoAsyncResourceHandler> weak_factory_; |
| 152 DISALLOW_COPY_AND_ASSIGN(MojoAsyncResourceHandler); | 152 DISALLOW_COPY_AND_ASSIGN(MojoAsyncResourceHandler); |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 } // namespace content | 155 } // namespace content |
| 156 | 156 |
| 157 #endif // CONTENT_BROWSER_LOADER_MOJO_ASYNC_RESOURCE_HANDLER_H_ | 157 #endif // CONTENT_BROWSER_LOADER_MOJO_ASYNC_RESOURCE_HANDLER_H_ |
| OLD | NEW |