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

Side by Side Diff: content/common/network_service.mojom

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
« no previous file with comments | « content/browser/webui/web_ui_url_loader_factory.cc ('k') | content/network/cache_url_loader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 module content.mojom; 5 module content.mojom;
6 6
7 import "mojo/common/file_path.mojom";
7 import "url_loader.mojom"; 8 import "url_loader.mojom";
9 import "url_loader_factory.mojom";
10 import "url/mojo/url.mojom";
11
12 // Parameters for constructing a network context.
13 struct NetworkContextParams {
14 // Points to the cookie file. If null, an in-memory database is used.
15 mojo.common.mojom.FilePath? cookie_path;
16 // Points to the cache directory. If null, an in-memory database is used.
17 mojo.common.mojom.FilePath? cache_dir;
18 };
19
20 // Represents a distinct context for making network requests, with its own
21 // storage (e.g. cookies and cache).
22 interface NetworkContext {
23 // |process_id| is 0 for requests initiated in the browser process, otherwise
24 // it's the child process ID.
25 CreateURLLoaderFactory(URLLoaderFactory& url_loader_factory,
26 uint32 process_id);
27
28 // Handle a request to display cache data to the user. |url| is parsed to
29 // display different parts of the cache.
30 HandleViewCacheRequest(url.mojom.Url url,
31 URLLoaderClient client);
32 };
8 33
9 // Browser interface to the network service. 34 // Browser interface to the network service.
10 interface NetworkService { 35 interface NetworkService {
11 HandleViewCacheRequest(URLRequest request, 36 // Creates a new network context with the given parameters.
12 URLLoaderClient client); 37 CreateNetworkContext(NetworkContext& context,
38 NetworkContextParams params);
13 }; 39 };
OLDNEW
« no previous file with comments | « content/browser/webui/web_ui_url_loader_factory.cc ('k') | content/network/cache_url_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698