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

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: Use memcpy to solve alignment issue. 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..0668ef0d9ac071bd5de4e15b7ea9859fc92b5a74 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
@@ -26,6 +26,19 @@ interface URLResponseDiskCache {
GetFile(mojo.URLResponse response) =>
(array<uint8>? file_path, array<uint8>? cache_dir_path);
+ // 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.
+ GetCachedResponse(string url) => (mojo.URLResponse? response,
+ array<uint8>? file_path,
+ array<uint8>? cache_dir_path);
+
+ // Update the cache with the given response.
+ UpdateCache(mojo.URLResponse response);
+
+
// 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

Powered by Google App Engine
This is Rietveld 408576698