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

Unified Diff: shell/application_manager/network_fetcher.cc

Issue 1131953006: Shell: switches cleanup. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: gn android fix 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/network_fetcher.h ('k') | shell/child_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/application_manager/network_fetcher.cc
diff --git a/shell/application_manager/network_fetcher.cc b/shell/application_manager/network_fetcher.cc
index ca5fdd80814cea315b885f59c4392a415f7602e1..683e576637827f705f5baa5edb759465000424c9 100644
--- a/shell/application_manager/network_fetcher.cc
+++ b/shell/application_manager/network_fetcher.cc
@@ -22,18 +22,19 @@
#include "mojo/common/data_pipe_utils.h"
#include "mojo/services/network/public/interfaces/network_service.mojom.h"
#include "shell/application_manager/data_pipe_peek.h"
-#include "shell/switches.h"
namespace shell {
NetworkFetcher::NetworkFetcher(
bool disable_cache,
+ bool predictable_app_filenames,
const GURL& url,
mojo::NetworkService* network_service,
mojo::URLResponseDiskCache* url_response_disk_cache,
const FetchCallback& loader_callback)
: Fetcher(loader_callback),
- disable_cache_(false),
+ disable_cache_(disable_cache),
+ predictable_app_filenames_(predictable_app_filenames),
url_(url),
url_response_disk_cache_(url_response_disk_cache),
weak_ptr_factory_(this) {
@@ -159,8 +160,7 @@ void NetworkFetcher::OnFileRetrievedFromCache(
if (success) {
path_ = base::FilePath(std::string(
reinterpret_cast<char*>(&path_as_array.front()), path_as_array.size()));
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kPredictableAppFilenames)) {
+ if (predictable_app_filenames_) {
// The copy completed, now move to $TMP/$APP_ID.mojo before the dlopen.
base::FilePath new_path;
if (RenameToAppId(url_, path_, &new_path)) {
« no previous file with comments | « shell/application_manager/network_fetcher.h ('k') | shell/child_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698