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

Unified Diff: shell/application_manager/application_manager.cc

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/application_manager.h ('k') | shell/application_manager/local_fetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/application_manager/application_manager.cc
diff --git a/shell/application_manager/application_manager.cc b/shell/application_manager/application_manager.cc
index e1a6125138500301fc0fb08209ac48dafa7e73b2..abaa11a1d932c773be249e4d5468fc1ea29d5173 100644
--- a/shell/application_manager/application_manager.cc
+++ b/shell/application_manager/application_manager.cc
@@ -178,23 +178,19 @@ void ApplicationManager::ConnectToApplicationWithParameters(
parameters);
if (resolved_url.SchemeIsFile()) {
- new LocalFetcher(
- resolved_url, GetBaseURLAndQuery(resolved_url, nullptr),
- base::Bind(callback, NativeApplicationCleanup::DONT_DELETE));
+ new LocalFetcher(resolved_url, GetBaseURLAndQuery(resolved_url, nullptr),
+ callback);
return;
}
- if (!network_service_)
+ if (!network_service_) {
ConnectToService(GURL("mojo:network_service"), &network_service_);
-
- const NativeApplicationCleanup cleanup =
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDontDeleteOnDownload)
- ? NativeApplicationCleanup::DONT_DELETE
- : NativeApplicationCleanup::DELETE;
+ ConnectToService(GURL("mojo:url_response_disk_cache"),
+ &url_response_disk_cache_);
+ }
new NetworkFetcher(disable_cache_, resolved_url, network_service_.get(),
- base::Bind(callback, cleanup));
+ url_response_disk_cache_.get(), callback);
}
bool ApplicationManager::ConnectToRunningApplication(
@@ -274,7 +270,6 @@ void ApplicationManager::HandleFetchCallback(
ServiceProviderPtr exposed_services,
const base::Closure& on_application_end,
const std::vector<std::string>& parameters,
- NativeApplicationCleanup cleanup,
scoped_ptr<Fetcher> fetcher) {
if (!fetcher) {
// Network error. Drop |application_request| to tell requestor.
@@ -342,13 +337,12 @@ void ApplicationManager::HandleFetchCallback(
blocking_pool_,
base::Bind(&ApplicationManager::RunNativeApplication,
weak_ptr_factory_.GetWeakPtr(), base::Passed(request.Pass()),
- options, cleanup, base::Passed(fetcher.Pass())));
+ options, base::Passed(fetcher.Pass())));
}
void ApplicationManager::RunNativeApplication(
InterfaceRequest<Application> application_request,
const NativeRunnerFactory::Options& options,
- NativeApplicationCleanup cleanup,
scoped_ptr<Fetcher> fetcher,
const base::FilePath& path,
bool path_exists) {
@@ -367,7 +361,7 @@ void ApplicationManager::RunNativeApplication(
path.AsUTF8Unsafe());
NativeRunner* runner = native_runner_factory_->Create(options).release();
native_runners_.push_back(runner);
- runner->Start(path, cleanup, application_request.Pass(),
+ runner->Start(path, application_request.Pass(),
base::Bind(&ApplicationManager::CleanupRunner,
weak_ptr_factory_.GetWeakPtr(), runner));
}
« no previous file with comments | « shell/application_manager/application_manager.h ('k') | shell/application_manager/local_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698