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

Unified Diff: shell/application_manager/network_fetcher.h

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 | « shell/application_manager/native_runner.h ('k') | shell/application_manager/network_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/application_manager/network_fetcher.h
diff --git a/shell/application_manager/network_fetcher.h b/shell/application_manager/network_fetcher.h
index f8632ad9f649b235f472d36bff9baeb6dfffa66a..c512b704af5d2445f22e00ac35663d4b8fcc512a 100644
--- a/shell/application_manager/network_fetcher.h
+++ b/shell/application_manager/network_fetcher.h
@@ -10,6 +10,7 @@
#include "base/files/file_path.h"
#include "base/memory/weak_ptr.h"
#include "mojo/services/network/public/interfaces/url_loader.mojom.h"
+#include "mojo/services/url_response_disk_cache/public/interfaces/url_response_disk_cache.mojom.h"
#include "url/gurl.h"
namespace mojo {
@@ -24,6 +25,7 @@ class NetworkFetcher : public Fetcher {
NetworkFetcher(bool disable_cache,
const GURL& url,
mojo::NetworkService* network_service,
+ mojo::URLResponseDiskCache* url_response_disk_cache,
const FetchCallback& loader_callback);
~NetworkFetcher() override;
@@ -50,8 +52,10 @@ class NetworkFetcher : public Fetcher {
const base::FilePath& old_path,
base::FilePath* new_path);
- void CopyCompleted(base::Callback<void(const base::FilePath&, bool)> callback,
- bool success);
+ void OnFileRetrievedFromCache(
+ base::Callback<void(const base::FilePath&, bool)> callback,
+ mojo::Array<uint8_t> path_as_array,
+ mojo::Array<uint8_t> cache_dir);
void AsPath(
base::TaskRunner* task_runner,
@@ -70,6 +74,7 @@ class NetworkFetcher : public Fetcher {
bool disable_cache_;
const GURL url_;
+ mojo::URLResponseDiskCache* url_response_disk_cache_;
mojo::URLLoaderPtr url_loader_;
mojo::URLResponsePtr response_;
base::FilePath path_;
« no previous file with comments | « shell/application_manager/native_runner.h ('k') | shell/application_manager/network_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698