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

Unified Diff: mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom

Issue 1088533003: Adding URLResponse Disk Cache to mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 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 | « mojo/services/url_response_disk_cache/public/interfaces/BUILD.gn ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom
diff --git a/mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom b/mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..b808b6e5aad95894e15d9057bc95e7ccf988053b
--- /dev/null
+++ b/mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom
@@ -0,0 +1,35 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module mojo;
+
+import "mojo/services/network/public/interfaces/url_loader.mojom";
+
+// This service allows client to efficiently cache and retrieve url response
+// content on disk. In particular, it allows the shell and content handlers to
+// efficiently cache and retrieve mojo applications.
+// TODO(qsr): At the moment, the url response disk cache only handles ETag. If
+// either the cached version or the given response do not contain
+// ETags, the entry will be invalidated. It should be extended to
+// handle all the other http cache mechanisms for better performance
+// with http servers that do not support ETags.
+interface URLResponseDiskCache {
+
+ // Given a URLResponse, returns a pair of paths. |file_path| is a file
+ // containing the body of the response. |cache_dir_path| is a directory that
+ // the applicaton can use to store content. This service guarantee that
+ // |cache_dir_path| will be emptied when |file_path| content changes. For
+ // example, a content handler that is backed by a VM that compiles files
+ // could have the VM use this directory to cache the compiled files.
+ GetFile(mojo.URLResponse response) =>
+ (array<uint8>? file_path, array<uint8>? cache_dir_path);
+
+ // Given a URLResponse that is expected to have a zipped body, returns a
+ // pair of paths. |extracted_dir_path| is a directory containing the unzipped
+ // body of the response. |cache_dir_path| is a directory that the applicaton
+ // can use to store content. This service guarantee that |cache_dir_path|
+ // will be emptied when |extracted_dir_path| content changes.
+ GetExtractedContent(mojo.URLResponse response) =>
+ (array<uint8>? extracted_dir_path, array<uint8>? cache_dir_path);
+};
« no previous file with comments | « mojo/services/url_response_disk_cache/public/interfaces/BUILD.gn ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698