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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/network_service.mojom
diff --git a/content/common/network_service.mojom b/content/common/network_service.mojom
index 4067316da76898a2cda86ae1113f904270d788a2..a771cbd96b1e628f307c29a33232605130a4ca7d 100644
--- a/content/common/network_service.mojom
+++ b/content/common/network_service.mojom
@@ -4,10 +4,36 @@
module content.mojom;
+import "mojo/common/file_path.mojom";
import "url_loader.mojom";
+import "url_loader_factory.mojom";
+import "url/mojo/url.mojom";
+
+// Parameters for constructing a network context.
+struct NetworkContextParams {
+ // Points to the cookie file. If null, an in-memory database is used.
+ mojo.common.mojom.FilePath? cookie_path;
+ // Points to the cache directory. If null, an in-memory database is used.
+ mojo.common.mojom.FilePath? cache_dir;
+};
+
+// Represents a distinct context for making network requests, with its own
+// storage (e.g. cookies and cache).
+interface NetworkContext {
+ // |process_id| is 0 for requests initiated in the browser process, otherwise
+ // it's the child process ID.
+ CreateURLLoaderFactory(URLLoaderFactory& url_loader_factory,
+ uint32 process_id);
+
+ // Handle a request to display cache data to the user. |url| is parsed to
+ // display different parts of the cache.
+ HandleViewCacheRequest(url.mojom.Url url,
+ URLLoaderClient client);
+};
// Browser interface to the network service.
interface NetworkService {
- HandleViewCacheRequest(URLRequest request,
- URLLoaderClient client);
+ // Creates a new network context with the given parameters.
+ CreateNetworkContext(NetworkContext& context,
+ NetworkContextParams params);
};
« 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