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

Unified Diff: shell/application_manager/network_fetcher.h

Issue 1351693007: Add invalidation to url_response_disk_cache. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review 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: shell/application_manager/network_fetcher.h
diff --git a/shell/application_manager/network_fetcher.h b/shell/application_manager/network_fetcher.h
index 2ef483be2ca1cdd2c366e5bafe0462fe5a08ef2a..6161dd801542c319bf3d44676a2eebf1a26bcc70 100644
--- a/shell/application_manager/network_fetcher.h
+++ b/shell/application_manager/network_fetcher.h
@@ -49,20 +49,27 @@ class NetworkFetcher : public Fetcher {
// are not loaded from cache to allow effective development.
bool CanLoadDirectlyFromCache();
- void LoadFromCache(bool schedule_update);
+ // Tries to load the URL directly from the offline cache.
+ void LoadFromCache();
- void OnCachedResponseReceived(bool schedule_update,
- mojo::URLResponsePtr response,
- mojo::Array<uint8_t> path_as_array,
- mojo::Array<uint8_t> cache_dir);
+ // Callback from the offline cache.
+ void OnResponseReceived(bool schedule_update,
+ mojo::URLResponsePtr response,
+ mojo::Array<uint8_t> path_as_array,
+ mojo::Array<uint8_t> cache_dir);
+ // Start a network request to load the URL.
void StartNetworkRequest();
+ // Callback from the network stack.
void OnLoadComplete(mojo::URLResponsePtr response);
- void OnFileSavedToCache(mojo::Array<uint8_t> path_as_array,
+ // Callback from the offline cache when the response is saved by the cache.
+ void OnFileSavedToCache(mojo::URLResponsePtr response,
+ mojo::Array<uint8_t> path_as_array,
mojo::Array<uint8_t> cache_dir);
+ // Record the mapping from URLs to files.
static void RecordCacheToURLMapping(const base::FilePath& path,
const GURL& url);
« no previous file with comments | « services/url_response_disk_cache/url_response_disk_cache_impl.cc ('k') | shell/application_manager/network_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698