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

Side by Side Diff: mojo/shell/context.cc

Issue 292743017: Cleanup: Use base::CommandLine in mojo/ (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/shell/child_process_host.cc ('k') | mojo/shell/desktop/mojo_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/shell/context.h" 5 #include "mojo/shell/context.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 Context::Context() 77 Context::Context()
78 : task_runners_(base::MessageLoop::current()->message_loop_proxy()), 78 : task_runners_(base::MessageLoop::current()->message_loop_proxy()),
79 storage_(), 79 storage_(),
80 loader_(task_runners_.io_runner(), 80 loader_(task_runners_.io_runner(),
81 task_runners_.file_runner(), 81 task_runners_.file_runner(),
82 task_runners_.cache_runner(), 82 task_runners_.cache_runner(),
83 scoped_ptr<net::NetworkDelegate>(new NetworkDelegate()), 83 scoped_ptr<net::NetworkDelegate>(new NetworkDelegate()),
84 storage_.profile_path()) { 84 storage_.profile_path()) {
85 setup.Get(); 85 setup.Get();
86 CommandLine* cmdline = CommandLine::ForCurrentProcess(); 86 base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
87 scoped_ptr<DynamicServiceRunnerFactory> runner_factory; 87 scoped_ptr<DynamicServiceRunnerFactory> runner_factory;
88 if (cmdline->HasSwitch(switches::kEnableMultiprocess)) 88 if (cmdline->HasSwitch(switches::kEnableMultiprocess))
89 runner_factory.reset(new OutOfProcessDynamicServiceRunnerFactory()); 89 runner_factory.reset(new OutOfProcessDynamicServiceRunnerFactory());
90 else 90 else
91 runner_factory.reset(new InProcessDynamicServiceRunnerFactory()); 91 runner_factory.reset(new InProcessDynamicServiceRunnerFactory());
92 92
93 service_manager_.set_default_loader( 93 service_manager_.set_default_loader(
94 scoped_ptr<ServiceLoader>( 94 scoped_ptr<ServiceLoader>(
95 new DynamicServiceLoader(this, runner_factory.Pass()))); 95 new DynamicServiceLoader(this, runner_factory.Pass())));
96 // The native viewport service synchronously waits for certain messages. If we 96 // The native viewport service synchronously waits for certain messages. If we
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 #if defined(USE_AURA) 128 #if defined(USE_AURA)
129 service_manager_.SetLoaderForURL( 129 service_manager_.SetLoaderForURL(
130 scoped_ptr<ServiceLoader>(), 130 scoped_ptr<ServiceLoader>(),
131 GURL("mojo:mojo_view_manager")); 131 GURL("mojo:mojo_view_manager"));
132 #endif 132 #endif
133 service_manager_.set_default_loader(scoped_ptr<ServiceLoader>()); 133 service_manager_.set_default_loader(scoped_ptr<ServiceLoader>());
134 } 134 }
135 135
136 } // namespace shell 136 } // namespace shell
137 } // namespace mojo 137 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/child_process_host.cc ('k') | mojo/shell/desktop/mojo_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698