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

Side by Side Diff: content/public/network/network_service.h

Issue 2968293002: Introduce SystemNetworkContextManager. (Closed)
Patch Set: Response to comments Created 3 years, 5 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
« no previous file with comments | « content/public/network/DEPS ('k') | content/public/test/test_url_loader_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_NETWORK_NETWORK_SERVICE_H_
6 #define CONTENT_PUBLIC_NETWORK_NETWORK_SERVICE_H_
7
8 #include <memory>
9
10 #include "content/common/content_export.h"
11 #include "content/public/common/network_service.mojom.h"
12
13 namespace net {
14 class URLRequestContext;
15 class URLRequestContextBuilder;
16 } // namespace net
17
18 namespace content {
19
20 // Allows an in-process NetworkService to be set up.
21 class CONTENT_EXPORT NetworkService : public mojom::NetworkService {
22 public:
23 // TODO(mmenke): Take in a NetworkServiceRequest.
24 static std::unique_ptr<NetworkService> Create();
25
26 // Can be used to seed a NetworkContext with a consumer-configured
27 // URLRequestContextBuilder, which |params| will then be applied to. The
28 // results URLRequestContext will be written to |url_request_context|, which
29 // is owned by the NetworkContext, and can be further modified before first
30 // use. The returned NetworkContext must be destroyed before the
31 // NetworkService.
32 //
33 // This method is intended to ease the transition to an out-of-process
34 // NetworkService, and will be removed once that ships.
35 virtual std::unique_ptr<mojom::NetworkContext>
36 CreateNetworkContextWithBuilder(
37 content::mojom::NetworkContextRequest request,
38 content::mojom::NetworkContextParamsPtr params,
39 std::unique_ptr<net::URLRequestContextBuilder> builder,
40 net::URLRequestContext** url_request_context) = 0;
41
42 ~NetworkService() override {}
43
44 protected:
45 NetworkService() {}
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_PUBLIC_NETWORK_NETWORK_SERVICE_H_
OLDNEW
« no previous file with comments | « content/public/network/DEPS ('k') | content/public/test/test_url_loader_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698