Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Side by Side Diff: content/network/url_loader_impl.h

Issue 2893233002: Network traffic annotation added to URLLoaderImpl. (Closed)
Patch Set: Comment addressed, Merged. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 26 matching lines...) Expand all
68 mojo::SimpleWatcher peer_closed_handle_watcher_; 70 mojo::SimpleWatcher peer_closed_handle_watcher_;
69 71
70 base::WeakPtrFactory<URLLoaderImpl> weak_ptr_factory_; 72 base::WeakPtrFactory<URLLoaderImpl> weak_ptr_factory_;
71 73
72 DISALLOW_COPY_AND_ASSIGN(URLLoaderImpl); 74 DISALLOW_COPY_AND_ASSIGN(URLLoaderImpl);
73 }; 75 };
74 76
75 } // namespace content 77 } // namespace content
76 78
77 #endif // CONTENT_NETWORK_URL_LOADER_IMPL_H_ 79 #endif // CONTENT_NETWORK_URL_LOADER_IMPL_H_
OLDNEW
« no previous file with comments | « content/network/network_service_url_loader_factory_impl.cc ('k') | content/network/url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698