| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_NETWORK_URL_LOADER_IMPL_H_ | 5 #ifndef CONTENT_NETWORK_URL_LOADER_IMPL_H_ |
| 6 #define CONTENT_NETWORK_URL_LOADER_IMPL_H_ | 6 #define CONTENT_NETWORK_URL_LOADER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "content/common/url_loader.mojom.h" | 14 #include "content/common/url_loader.mojom.h" |
| 15 #include "mojo/public/cpp/bindings/associated_binding.h" | 15 #include "mojo/public/cpp/bindings/associated_binding.h" |
| 16 #include "mojo/public/cpp/system/simple_watcher.h" | 16 #include "mojo/public/cpp/system/simple_watcher.h" |
| 17 #include "net/traffic_annotation/network_traffic_annotation.h" |
| 17 #include "net/url_request/url_request.h" | 18 #include "net/url_request/url_request.h" |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| 20 | 21 |
| 21 class NetworkContext; | 22 class NetworkContext; |
| 22 class NetToMojoPendingBuffer; | 23 class NetToMojoPendingBuffer; |
| 23 | 24 |
| 24 class CONTENT_EXPORT URLLoaderImpl : public mojom::URLLoader, | 25 class CONTENT_EXPORT URLLoaderImpl : public mojom::URLLoader, |
| 25 public net::URLRequest::Delegate { | 26 public net::URLRequest::Delegate { |
| 26 public: | 27 public: |
| 27 URLLoaderImpl(NetworkContext* context, | 28 URLLoaderImpl(NetworkContext* context, |
| 28 mojom::URLLoaderAssociatedRequest url_loader_request, | 29 mojom::URLLoaderAssociatedRequest url_loader_request, |
| 29 int32_t options, | 30 int32_t options, |
| 30 const ResourceRequest& request, | 31 const ResourceRequest& request, |
| 31 mojom::URLLoaderClientPtr url_loader_client); | 32 mojom::URLLoaderClientPtr url_loader_client, |
| 33 const net::NetworkTrafficAnnotationTag& traffic_annotation); |
| 32 ~URLLoaderImpl() override; | 34 ~URLLoaderImpl() override; |
| 33 | 35 |
| 34 // Called when the associated NetworkContext is going away. | 36 // Called when the associated NetworkContext is going away. |
| 35 void Cleanup(); | 37 void Cleanup(); |
| 36 | 38 |
| 37 // mojom::URLLoader implementation: | 39 // mojom::URLLoader implementation: |
| 38 void FollowRedirect() override; | 40 void FollowRedirect() override; |
| 39 void SetPriority(net::RequestPriority priority, | 41 void SetPriority(net::RequestPriority priority, |
| 40 int32_t intra_priority_value) override; | 42 int32_t intra_priority_value) override; |
| 41 | 43 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 70 mojo::SimpleWatcher peer_closed_handle_watcher_; | 72 mojo::SimpleWatcher peer_closed_handle_watcher_; |
| 71 | 73 |
| 72 base::WeakPtrFactory<URLLoaderImpl> weak_ptr_factory_; | 74 base::WeakPtrFactory<URLLoaderImpl> weak_ptr_factory_; |
| 73 | 75 |
| 74 DISALLOW_COPY_AND_ASSIGN(URLLoaderImpl); | 76 DISALLOW_COPY_AND_ASSIGN(URLLoaderImpl); |
| 75 }; | 77 }; |
| 76 | 78 |
| 77 } // namespace content | 79 } // namespace content |
| 78 | 80 |
| 79 #endif // CONTENT_NETWORK_URL_LOADER_IMPL_H_ | 81 #endif // CONTENT_NETWORK_URL_LOADER_IMPL_H_ |
| OLD | NEW |