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

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

Issue 1276073004: Offline By Default (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rename MoveIntoDir Created 5 years, 3 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
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
index d6868b4b5cf817f19c1e5f191e09430e3fec07fe..ec13a23c96ee01669e4609c99cd24d27d0e92aad 100644
--- 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
@@ -17,13 +17,25 @@ import "mojo/public/interfaces/network/url_response.mojom";
// with http servers that do not support ETags.
interface URLResponseDiskCache {
+ // Given an URL, returns a tuple. If the |url| is not in the cache, all the
+ // response parameters are null. Otherwise |response| is the cached response
+ // stripped of the body, |file_path| is a file containing the body of the
+ // response and |cache_dir_path| is a directory that the applicaton can use
+ // to store content.
ppi 2015/09/08 15:46:25 Please clarify when dir at cache_dir_path gets cle
qsr 2015/09/11 15:47:57 Done.
+ Get(string url) => (mojo.URLResponse? response,
+ array<uint8>? file_path,
+ array<uint8>? cache_dir_path);
+
+ // Update the cache with the given response.
+ Update(mojo.URLResponse response);
+
// Given a URLResponse, returns a pair of paths. |file_path| is a file
ppi 2015/09/08 15:46:25 Given a URLResponse, updates the cache and returns
qsr 2015/09/11 15:47:57 Done.
// 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) =>
+ UpdateAndGet(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
ppi 2015/09/08 15:46:26 Given a URLResponse that is expected to have a zip
qsr 2015/09/11 15:47:57 Done.
@@ -31,6 +43,6 @@ interface URLResponseDiskCache {
// 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) =>
+ UpdateAndGetExtracted(mojo.URLResponse response) =>
(array<uint8>? extracted_dir_path, array<uint8>? cache_dir_path);
};

Powered by Google App Engine
This is Rietveld 408576698