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

Unified Diff: shell/dynamic_application_loader.cc

Issue 865253002: Delete temporary application file as soon as the application is launched. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: clang format Created 5 years, 11 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/dynamic_application_loader.cc
diff --git a/shell/dynamic_application_loader.cc b/shell/dynamic_application_loader.cc
index 374484531eaba8ca9b5b7f9f5703bfdeeaf22309..71fb47e25e53361705c744f0d127eda57dfd2d1f 100644
--- a/shell/dynamic_application_loader.cc
+++ b/shell/dynamic_application_loader.cc
@@ -81,6 +81,8 @@ class DynamicApplicationLoader::Loader {
virtual bool PeekFirstLine(std::string* line) = 0;
+ virtual bool CleanPath() = 0;
Aaron Boodman 2015/01/22 19:51:30 This doesn't appear to ever be answered based on r
qsr 2015/01/26 09:12:13 Done.
+
void Load() {
// If the response begins with a #!mojo <content-handler-url>, use it.
GURL url;
@@ -139,7 +141,7 @@ class DynamicApplicationLoader::Loader {
runner_ = runner_factory_->Create(context_);
runner_->Start(
- path, shell_handle_.Pass(),
+ path, CleanPath(), shell_handle_.Pass(),
base::Bind(&Loader::ReportComplete, weak_ptr_factory_.GetWeakPtr()));
}
@@ -234,6 +236,8 @@ class DynamicApplicationLoader::LocalLoader : public Loader {
return true;
}
+ bool CleanPath() override { return false; }
+
GURL url_;
base::FilePath path_;
@@ -339,6 +343,8 @@ class DynamicApplicationLoader::NetworkLoader : public Loader {
kPeekTimeout);
}
+ bool CleanPath() override { return true; }
+
void StartNetworkRequest(const GURL& url, NetworkService* network_service) {
URLRequestPtr request(URLRequest::New());
request->url = String::From(url);

Powered by Google App Engine
This is Rietveld 408576698