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

Side by Side Diff: mojo/services/service_cache/public/interfaces/service_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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module mojo.service_cache;
6
7 import "mojo/services/network/public/interfaces/url_loader.mojom";
8
9 // This service allows the mojo shell and content handler to efficiently cache
blundell 2015/05/07 11:29:21 I would expand on this comment to reflect our offl
qsr 2015/05/07 12:49:02 Done.
10 // and retrieve mojo applications.
11 // TODO(qsr): At the moment, the service cache only handles ETag. It should
12 // also handles all the other http cache mechanisms.
blundell 2015/05/07 11:29:21 I would expand on this to be more explicit about w
qsr 2015/05/07 12:49:02 Comment extended. And yes this is correct, the cac
13 interface ServiceCache {
14
15 // Given a URLResponse, returns a pair of path. |file_path| is a file
blundell 2015/05/07 11:29:21 nit: s/path/paths
blundell 2015/05/07 11:29:21 s/path/paths
qsr 2015/05/07 12:49:02 Done.
qsr 2015/05/07 12:49:02 Done.
16 // containing the body of the response. |cache_dir_path| is a directory that
17 // the applicaton can use to store content. This service guarantee that
blundell 2015/05/07 11:29:21 Since it's a little opaque why |cache_dir_path| is
qsr 2015/05/07 12:49:02 Done.
18 // |cache_dir_path| will be emptied when |file_path| content changes.
19 GetFile(mojo.URLResponse response) =>
20 (array<uint8>? file_path, array<uint8>? cache_dir_path);
21
22 // Given a URLResponse that is expected to have a zipped body, returns a
23 // pair of path. |extracted_dir_path| is a directory containing the unzipped
24 // body of the response. |cache_dir_path| is a directory that the applicaton
25 // can use to store content. This service guarantee that |cache_dir_path|
26 // will be emptied when |extracted_dir_path| content changes.
27 GetExtractedContent(mojo.URLResponse response) =>
28 (array<uint8>? extracted_dir_path, array<uint8>? cache_dir_path);
29 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698