Chromium Code Reviews| OLD | NEW |
|---|---|
| 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. | |
|
Tom Sepez
2017/05/12 23:26:33
relative to what? Is this the complete path, or
jam
2017/05/13 00:01:35
Presumably this would be a complete path. Sending
| |
| 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; | |
|
Tom Sepez
2017/05/12 23:26:33
Same question here. Also, how is this organized g
jam
2017/05/13 00:01:35
Each profile (or really, storage partition) needs
| |
| 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 }; |
| OLD | NEW |