| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/app/mash/mash_runner.h" | 5 #include "chrome/app/mash/mash_runner.h" |
| 6 | 6 |
| 7 #include "ash/mus/sysui_application.h" | 7 #include "ash/mus/sysui_application.h" |
| 8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 int MashMain() { | 213 int MashMain() { |
| 214 #if defined(OS_WIN) | 214 #if defined(OS_WIN) |
| 215 base::RouteStdioToConsole(false); | 215 base::RouteStdioToConsole(false); |
| 216 #endif | 216 #endif |
| 217 // TODO(sky): wire this up correctly. | 217 // TODO(sky): wire this up correctly. |
| 218 logging::LoggingSettings settings; | 218 logging::LoggingSettings settings; |
| 219 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 219 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
| 220 logging::InitLogging(settings); | 220 logging::InitLogging(settings); |
| 221 // To view log output with IDs and timestamps use "adb logcat -v threadtime". | 221 // To view log output with IDs and timestamps use "adb logcat -v threadtime". |
| 222 logging::SetLogItems(false, // Process ID | 222 logging::SetLogItems(true, // Process ID |
| 223 false, // Thread ID | 223 true, // Thread ID |
| 224 false, // Timestamp | 224 true, // Timestamp |
| 225 false); // Tick count | 225 true); // Tick count |
| 226 | 226 |
| 227 // TODO(sky): use MessagePumpMojo. | 227 // TODO(sky): use MessagePumpMojo. |
| 228 scoped_ptr<base::MessageLoop> message_loop; | 228 scoped_ptr<base::MessageLoop> message_loop; |
| 229 #if defined(OS_LINUX) | 229 #if defined(OS_LINUX) |
| 230 base::AtExitManager exit_manager; | 230 base::AtExitManager exit_manager; |
| 231 #endif | 231 #endif |
| 232 if (!IsChild()) | 232 if (!IsChild()) |
| 233 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); | 233 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); |
| 234 MashRunner mash_runner; | 234 MashRunner mash_runner; |
| 235 mash_runner.Run(); | 235 mash_runner.Run(); |
| 236 return 0; | 236 return 0; |
| 237 } | 237 } |
| OLD | NEW |