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

Unified Diff: shell/application_manager/application_manager.cc

Issue 1046013002: Split LoadAndRunNativeApplication() ... (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh Created 5 years, 9 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/native_runner.h » ('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 b8c4182383fe7aa6497f828c0e48acb4f5a7cc40..50d3468cadc1b92cf05c489e35c669f4823daf01 100644
--- a/shell/application_manager/application_manager.cc
+++ b/shell/application_manager/application_manager.cc
@@ -182,22 +182,23 @@ void ApplicationManager::ConnectToApplicationWithParameters(
parameters);
if (resolved_url.SchemeIsFile()) {
- new LocalFetcher(resolved_url, GetBaseURLAndQuery(resolved_url, nullptr),
- base::Bind(callback, NativeRunner::DontDeleteAppPath));
+ new LocalFetcher(
+ resolved_url, GetBaseURLAndQuery(resolved_url, nullptr),
+ base::Bind(callback, NativeApplicationCleanup::DONT_DELETE));
return;
}
if (!network_service_)
ConnectToService(GURL("mojo:network_service"), &network_service_);
- const NativeRunner::CleanupBehavior cleanup_behavior =
+ const NativeApplicationCleanup cleanup =
base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDontDeleteOnDownload)
- ? NativeRunner::DontDeleteAppPath
- : NativeRunner::DeleteAppPath;
+ ? NativeApplicationCleanup::DONT_DELETE
+ : NativeApplicationCleanup::DELETE;
new NetworkFetcher(disable_cache_, resolved_url, network_service_.get(),
- base::Bind(callback, cleanup_behavior));
+ base::Bind(callback, cleanup));
}
bool ApplicationManager::ConnectToRunningApplication(
@@ -276,7 +277,7 @@ void ApplicationManager::HandleFetchCallback(
ServiceProviderPtr exposed_services,
const base::Closure& on_application_end,
const std::vector<std::string>& parameters,
- NativeRunner::CleanupBehavior cleanup_behavior,
+ NativeApplicationCleanup cleanup,
scoped_ptr<Fetcher> fetcher) {
if (!fetcher) {
// Network error. Drop |application_request| to tell requestor.
@@ -344,13 +345,13 @@ void ApplicationManager::HandleFetchCallback(
blocking_pool_,
base::Bind(&ApplicationManager::RunNativeApplication,
weak_ptr_factory_.GetWeakPtr(), base::Passed(request.Pass()),
- options, cleanup_behavior, base::Passed(fetcher.Pass())));
+ options, cleanup, base::Passed(fetcher.Pass())));
}
void ApplicationManager::RunNativeApplication(
InterfaceRequest<Application> application_request,
const NativeRunnerFactory::Options& options,
- NativeRunner::CleanupBehavior cleanup_behavior,
+ NativeApplicationCleanup cleanup,
scoped_ptr<Fetcher> fetcher,
const base::FilePath& path,
bool path_exists) {
@@ -369,7 +370,7 @@ void ApplicationManager::RunNativeApplication(
path.AsUTF8Unsafe());
NativeRunner* runner = native_runner_factory_->Create(options).release();
native_runners_.push_back(runner);
- runner->Start(path, cleanup_behavior, application_request.Pass(),
+ runner->Start(path, cleanup, 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/native_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698