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

Side by Side Diff: mojo/application/public/cpp/lib/application_runner.cc

Issue 1317333003: Moves initialization of exception handler registration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add include Created 5 years, 3 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
« no previous file with comments | « no previous file | mojo/runner/android/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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/application/public/cpp/application_runner.h" 5 #include "mojo/application/public/cpp/application_runner.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/stack_trace.h"
10 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
11 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
12 #include "base/process/launch.h" 11 #include "base/process/launch.h"
13 #include "base/threading/worker_pool.h" 12 #include "base/threading/worker_pool.h"
14 #include "mojo/application/public/cpp/application_delegate.h" 13 #include "mojo/application/public/cpp/application_delegate.h"
15 #include "mojo/application/public/cpp/application_impl.h" 14 #include "mojo/application/public/cpp/application_impl.h"
16 #include "mojo/message_pump/message_pump_mojo.h" 15 #include "mojo/message_pump/message_pump_mojo.h"
17 16
18 namespace mojo { 17 namespace mojo {
19 18
(...skipping 20 matching lines...) Expand all
40 39
41 MojoResult ApplicationRunner::Run(MojoHandle application_request_handle, 40 MojoResult ApplicationRunner::Run(MojoHandle application_request_handle,
42 bool init_base) { 41 bool init_base) {
43 DCHECK(!has_run_); 42 DCHECK(!has_run_);
44 has_run_ = true; 43 has_run_ = true;
45 44
46 scoped_ptr<base::AtExitManager> at_exit; 45 scoped_ptr<base::AtExitManager> at_exit;
47 if (init_base) { 46 if (init_base) {
48 InitBaseCommandLine(); 47 InitBaseCommandLine();
49 at_exit.reset(new base::AtExitManager); 48 at_exit.reset(new base::AtExitManager);
50 #ifndef OFFICIAL_BUILD
51 base::debug::EnableInProcessStackDumping();
52 #if defined(OS_WIN)
53 base::RouteStdioToConsole(false);
54 #endif
55 #endif
56 } 49 }
57 50
58 { 51 {
59 scoped_ptr<base::MessageLoop> loop; 52 scoped_ptr<base::MessageLoop> loop;
60 if (message_loop_type_ == base::MessageLoop::TYPE_CUSTOM) 53 if (message_loop_type_ == base::MessageLoop::TYPE_CUSTOM)
61 loop.reset(new base::MessageLoop(common::MessagePumpMojo::Create())); 54 loop.reset(new base::MessageLoop(common::MessagePumpMojo::Create()));
62 else 55 else
63 loop.reset(new base::MessageLoop(message_loop_type_)); 56 loop.reset(new base::MessageLoop(message_loop_type_));
64 57
65 ApplicationImpl impl(delegate_.get(), 58 ApplicationImpl impl(delegate_.get(),
(...skipping 17 matching lines...) Expand all
83 base::WorkerPool::ShutDownCleanly(); 76 base::WorkerPool::ShutDownCleanly();
84 77
85 return MOJO_RESULT_OK; 78 return MOJO_RESULT_OK;
86 } 79 }
87 80
88 MojoResult ApplicationRunner::Run(MojoHandle application_request_handle) { 81 MojoResult ApplicationRunner::Run(MojoHandle application_request_handle) {
89 return Run(application_request_handle, true); 82 return Run(application_request_handle, true);
90 } 83 }
91 84
92 } // namespace mojo 85 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/runner/android/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698