| OLD | NEW |
| 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/runner/init.h" | 5 #include "mojo/shell/runner/init.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 namespace mojo { | 27 namespace mojo { |
| 28 namespace shell { | 28 namespace shell { |
| 29 | 29 |
| 30 void InitializeLogging() { | 30 void InitializeLogging() { |
| 31 logging::LoggingSettings settings; | 31 logging::LoggingSettings settings; |
| 32 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; | 32 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; |
| 33 logging::InitLogging(settings); | 33 logging::InitLogging(settings); |
| 34 // To view log output with IDs and timestamps use "adb logcat -v threadtime". | 34 // To view log output with IDs and timestamps use "adb logcat -v threadtime". |
| 35 logging::SetLogItems(false, // Process ID | 35 logging::SetLogItems(true, // Process ID |
| 36 false, // Thread ID | 36 true, // Thread ID |
| 37 false, // Timestamp | 37 true, // Timestamp |
| 38 false); // Tick count | 38 true); // Tick count |
| 39 } | 39 } |
| 40 | 40 |
| 41 void WaitForDebuggerIfNecessary() { | 41 void WaitForDebuggerIfNecessary() { |
| 42 const base::CommandLine* command_line = | 42 const base::CommandLine* command_line = |
| 43 base::CommandLine::ForCurrentProcess(); | 43 base::CommandLine::ForCurrentProcess(); |
| 44 if (command_line->HasSwitch(switches::kWaitForDebugger)) { | 44 if (command_line->HasSwitch(switches::kWaitForDebugger)) { |
| 45 std::vector<std::string> apps_to_debug = base::SplitString( | 45 std::vector<std::string> apps_to_debug = base::SplitString( |
| 46 command_line->GetSwitchValueASCII(switches::kWaitForDebugger), ",", | 46 command_line->GetSwitchValueASCII(switches::kWaitForDebugger), ",", |
| 47 base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 47 base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 48 std::string app = "launcher"; | 48 std::string app = "launcher"; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 79 const uint8_t* icu_data = base::i18n::GetRawIcuMemory(); | 79 const uint8_t* icu_data = base::i18n::GetRawIcuMemory(); |
| 80 init_function(icu_data); | 80 init_function(icu_data); |
| 81 } | 81 } |
| 82 | 82 |
| 83 // TODO(erg): All chromium binaries load base. We might want to make a | 83 // TODO(erg): All chromium binaries load base. We might want to make a |
| 84 // general system for other people. | 84 // general system for other people. |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace shell | 87 } // namespace shell |
| 88 } // namespace mojo | 88 } // namespace mojo |
| OLD | NEW |