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

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

Issue 2874163004: Add support in the network service for different contexts. (Closed)
Patch Set: review comment and clang fixes Created 3 years, 7 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 10
11 namespace content { 11 namespace content {
12 12
13 class NetworkContext; 13 class NetworkContext;
14 14
15 // This class is an implementation of mojom::URLLoaderFactory that creates 15 // This class is an implementation of mojom::URLLoaderFactory that creates
16 // a mojom::URLLoader. 16 // a mojom::URLLoader.
17 class NetworkServiceURLLoaderFactoryImpl : public mojom::URLLoaderFactory { 17 class NetworkServiceURLLoaderFactoryImpl : public mojom::URLLoaderFactory {
18 public: 18 public:
19 // NOTE: |context| must outlive this instance. 19 // NOTE: |context| must outlive this instance.
20 explicit NetworkServiceURLLoaderFactoryImpl(NetworkContext* context); 20 NetworkServiceURLLoaderFactoryImpl(NetworkContext* context,
21 uint32_t process_id);
21 22
22 ~NetworkServiceURLLoaderFactoryImpl() override; 23 ~NetworkServiceURLLoaderFactoryImpl() override;
23 24
24 // mojom::URLLoaderFactory implementation. 25 // mojom::URLLoaderFactory implementation.
25 void CreateLoaderAndStart(mojom::URLLoaderAssociatedRequest request, 26 void CreateLoaderAndStart(mojom::URLLoaderAssociatedRequest request,
26 int32_t routing_id, 27 int32_t routing_id,
27 int32_t request_id, 28 int32_t request_id,
28 uint32_t options, 29 uint32_t options,
29 const ResourceRequest& url_request, 30 const ResourceRequest& url_request,
30 mojom::URLLoaderClientPtr client) override; 31 mojom::URLLoaderClientPtr client) override;
31 void SyncLoad(int32_t routing_id, 32 void SyncLoad(int32_t routing_id,
32 int32_t request_id, 33 int32_t request_id,
33 const ResourceRequest& request, 34 const ResourceRequest& request,
34 SyncLoadCallback callback) override; 35 SyncLoadCallback callback) override;
35 36
36 private: 37 private:
37 // Not owned. 38 // Not owned.
38 NetworkContext* context_; 39 NetworkContext* context_;
40 int process_id_;
39 41
40 DISALLOW_COPY_AND_ASSIGN(NetworkServiceURLLoaderFactoryImpl); 42 DISALLOW_COPY_AND_ASSIGN(NetworkServiceURLLoaderFactoryImpl);
41 }; 43 };
42 44
43 } // namespace content 45 } // namespace content
44 46
45 #endif // CONTENT_NETWORK_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_ 47 #endif // CONTENT_NETWORK_NETWORK_SERVICE_URL_LOADER_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « content/network/network_service.cc ('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