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

Side by Side Diff: content/network/network_service_url_loader_factory_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_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_ 5 #ifndef CONTENT_NETWORK_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_
6 #define CONTENT_NETWORK_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_ 6 #define CONTENT_NETWORK_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/common/url_loader_factory.mojom.h" 9 #include "content/common/url_loader_factory.mojom.h"
10 #include "net/traffic_annotation/network_traffic_annotation.h"
10 11
11 namespace content { 12 namespace content {
12 13
13 class NetworkContext; 14 class NetworkContext;
14 15
15 // This class is an implementation of mojom::URLLoaderFactory that creates 16 // This class is an implementation of mojom::URLLoaderFactory that creates
16 // a mojom::URLLoader. 17 // a mojom::URLLoader.
17 class NetworkServiceURLLoaderFactoryImpl : public mojom::URLLoaderFactory { 18 class NetworkServiceURLLoaderFactoryImpl : public mojom::URLLoaderFactory {
18 public: 19 public:
19 // NOTE: |context| must outlive this instance. 20 // NOTE: |context| must outlive this instance.
20 NetworkServiceURLLoaderFactoryImpl(NetworkContext* context, 21 NetworkServiceURLLoaderFactoryImpl(NetworkContext* context,
21 uint32_t process_id); 22 uint32_t process_id);
22 23
23 ~NetworkServiceURLLoaderFactoryImpl() override; 24 ~NetworkServiceURLLoaderFactoryImpl() override;
24 25
25 // mojom::URLLoaderFactory implementation. 26 // mojom::URLLoaderFactory implementation.
26 void CreateLoaderAndStart(mojom::URLLoaderAssociatedRequest request, 27 void CreateLoaderAndStart(mojom::URLLoaderAssociatedRequest request,
27 int32_t routing_id, 28 int32_t routing_id,
28 int32_t request_id, 29 int32_t request_id,
29 uint32_t options, 30 uint32_t options,
30 const ResourceRequest& url_request, 31 const ResourceRequest& url_request,
31 mojom::URLLoaderClientPtr client) override; 32 mojom::URLLoaderClientPtr client,
33 const net::MutableNetworkTrafficAnnotationTag&
34 traffic_annotation) override;
32 void SyncLoad(int32_t routing_id, 35 void SyncLoad(int32_t routing_id,
33 int32_t request_id, 36 int32_t request_id,
34 const ResourceRequest& request, 37 const ResourceRequest& request,
35 SyncLoadCallback callback) override; 38 SyncLoadCallback callback) override;
36 39
37 private: 40 private:
38 // Not owned. 41 // Not owned.
39 NetworkContext* context_; 42 NetworkContext* context_;
40 int process_id_; 43 int process_id_;
41 44
42 DISALLOW_COPY_AND_ASSIGN(NetworkServiceURLLoaderFactoryImpl); 45 DISALLOW_COPY_AND_ASSIGN(NetworkServiceURLLoaderFactoryImpl);
43 }; 46 };
44 47
45 } // namespace content 48 } // namespace content
46 49
47 #endif // CONTENT_NETWORK_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_ 50 #endif // CONTENT_NETWORK_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « content/common/url_loader_factory.mojom ('k') | content/network/network_service_url_loader_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698