OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/shell/app/shell_main_delegate.h" | 5 #include "content/shell/app/shell_main_delegate.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
136 v8_breakpad_support::SetUp(); | 136 v8_breakpad_support::SetUp(); |
137 #endif | 137 #endif |
138 #if defined(OS_MACOSX) | 138 #if defined(OS_MACOSX) |
139 // Needs to happen before InitializeResourceBundle() and before | 139 // Needs to happen before InitializeResourceBundle() and before |
140 // BlinkTestPlatformInitialize() are called. | 140 // BlinkTestPlatformInitialize() are called. |
141 OverrideFrameworkBundlePath(); | 141 OverrideFrameworkBundlePath(); |
142 OverrideChildProcessPath(); | 142 OverrideChildProcessPath(); |
143 EnsureCorrectResolutionSettings(); | 143 EnsureCorrectResolutionSettings(); |
144 #endif // OS_MACOSX | 144 #endif // OS_MACOSX |
145 | 145 |
146 InitLogging(); | 146 // Log to stderr when run with --run-layout-tests |
147 // so the layout tests can capture and display any messages. | |
148 if (command_line.HasSwitch(switches::kRunLayoutTest)) { | |
149 logging::LoggingSettings settings; | |
150 logging::InitLogging(settings); | |
151 } else { | |
152 InitLogging(); | |
153 } | |
Dirk Pranke
2016/12/08 22:09:21
Having a routine in this file called InitLogging()
| |
147 if (command_line.HasSwitch(switches::kCheckLayoutTestSysDeps)) { | 154 if (command_line.HasSwitch(switches::kCheckLayoutTestSysDeps)) { |
148 // If CheckLayoutSystemDeps succeeds, we don't exit early. Instead we | 155 // If CheckLayoutSystemDeps succeeds, we don't exit early. Instead we |
149 // continue and try to load the fonts in BlinkTestPlatformInitialize | 156 // continue and try to load the fonts in BlinkTestPlatformInitialize |
150 // below, and then try to bring up the rest of the content module. | 157 // below, and then try to bring up the rest of the content module. |
151 if (!CheckLayoutSystemDeps()) { | 158 if (!CheckLayoutSystemDeps()) { |
152 *exit_code = 1; | 159 *exit_code = 1; |
153 return true; | 160 return true; |
154 } | 161 } |
155 } | 162 } |
156 | 163 |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
367 | 374 |
368 return renderer_client_.get(); | 375 return renderer_client_.get(); |
369 } | 376 } |
370 | 377 |
371 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { | 378 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { |
372 utility_client_.reset(new ShellContentUtilityClient); | 379 utility_client_.reset(new ShellContentUtilityClient); |
373 return utility_client_.get(); | 380 return utility_client_.get(); |
374 } | 381 } |
375 | 382 |
376 } // namespace content | 383 } // namespace content |
OLD | NEW |