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

Unified Diff: shell/context.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/child_switches.cc ('k') | shell/native_runner_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/context.cc
diff --git a/shell/context.cc b/shell/context.cc
index 331efa115f2c94b67b63d1eac6db058f0aa5fb39..b50916f5b96aceee959dba8f71a10c783b333130 100644
--- a/shell/context.cc
+++ b/shell/context.cc
@@ -61,6 +61,16 @@ class Setup {
DISALLOW_COPY_AND_ASSIGN(Setup);
};
+ApplicationManager::Options MakeApplicationManagerOptions() {
+ ApplicationManager::Options options;
+ options.disable_cache = base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableCache);
+ options.predictable_app_filenames =
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kPredictableAppFilenames);
+ return options;
+}
+
bool ConfigureURLMappings(const base::CommandLine& command_line,
Context* context) {
URLResolver* resolver = context->url_resolver();
@@ -201,7 +211,9 @@ class TracingServiceProvider : public ServiceProvider {
} // namespace
-Context::Context(Tracer* tracer) : tracer_(tracer), application_manager_(this) {
+Context::Context(Tracer* tracer)
+ : tracer_(tracer),
+ application_manager_(MakeApplicationManagerOptions(), this) {
DCHECK(!base::MessageLoop::current());
// By default assume that the local apps reside alongside the shell.
@@ -289,9 +301,6 @@ bool Context::InitWithPaths(const base::FilePath& shell_child_path) {
runner_factory.reset(new InProcessNativeRunnerFactory(this));
application_manager_.set_blocking_pool(task_runners_->blocking_pool());
application_manager_.set_native_runner_factory(runner_factory.Pass());
- application_manager_.set_disable_cache(
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableCache));
InitContentHandlers(&application_manager_, command_line);
InitNativeOptions(&application_manager_, command_line);
« no previous file with comments | « shell/child_switches.cc ('k') | shell/native_runner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698