Chromium Code Reviews| 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/files/file.h" | 10 #include "base/files/file.h" |
| 10 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 11 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
| 12 #include "base/logging.h" | 13 #include "base/logging.h" |
| 13 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 14 #include "cc/base/switches.h" | 15 #include "cc/base/switches.h" |
| 15 #include "content/public/browser/browser_main_runner.h" | 16 #include "content/public/browser/browser_main_runner.h" |
| 16 #include "content/public/common/content_switches.h" | 17 #include "content/public/common/content_switches.h" |
| 17 #include "content/public/common/url_constants.h" | 18 #include "content/public/common/url_constants.h" |
| 18 #include "content/public/test/layouttest_support.h" | 19 #include "content/public/test/layouttest_support.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 if (exit_code) | 179 if (exit_code) |
| 179 *exit_code = 1; | 180 *exit_code = 1; |
| 180 return true; | 181 return true; |
| 181 } | 182 } |
| 182 } | 183 } |
| 183 SetContentClient(&content_client_); | 184 SetContentClient(&content_client_); |
| 184 return false; | 185 return false; |
| 185 } | 186 } |
| 186 | 187 |
| 187 void ShellMainDelegate::PreSandboxStartup() { | 188 void ShellMainDelegate::PreSandboxStartup() { |
| 189 #if defined(ARCH_CPU_ARM_FAMILY) | |
| 190 #if defined(OS_ANDROID) || defined(USE_AURA) | |
|
Mark Mentovai
2014/03/11 16:17:48
Pull this whole thing into a single #ifdef:
#if d
rptr
2014/03/12 15:26:25
Done.
| |
| 191 // Create an instance CPU class to parse /proc/cpuinfo and cache cpu_brand | |
|
Mark Mentovai
2014/03/11 16:17:48
“instance of the CPU class”
rptr
2014/03/12 15:26:25
Done.
| |
| 192 // info. | |
| 193 base::CPU cpu_info; | |
| 194 #endif | |
| 195 #endif | |
| 188 if (CommandLine::ForCurrentProcess()->HasSwitch( | 196 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 189 switches::kEnableCrashReporter)) { | 197 switches::kEnableCrashReporter)) { |
| 190 std::string process_type = | 198 std::string process_type = |
| 191 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 199 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 192 switches::kProcessType); | 200 switches::kProcessType); |
| 193 breakpad::SetBreakpadClient(g_shell_breakpad_client.Pointer()); | 201 breakpad::SetBreakpadClient(g_shell_breakpad_client.Pointer()); |
| 194 #if defined(OS_MACOSX) | 202 #if defined(OS_MACOSX) |
| 195 base::mac::DisableOSCrashDumps(); | 203 base::mac::DisableOSCrashDumps(); |
| 196 breakpad::InitCrashReporter(process_type); | 204 breakpad::InitCrashReporter(process_type); |
| 197 breakpad::InitCrashProcessInfo(process_type); | 205 breakpad::InitCrashProcessInfo(process_type); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 browser_client_.reset(new ShellContentBrowserClient); | 293 browser_client_.reset(new ShellContentBrowserClient); |
| 286 return browser_client_.get(); | 294 return browser_client_.get(); |
| 287 } | 295 } |
| 288 | 296 |
| 289 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 297 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
| 290 renderer_client_.reset(new ShellContentRendererClient); | 298 renderer_client_.reset(new ShellContentRendererClient); |
| 291 return renderer_client_.get(); | 299 return renderer_client_.get(); |
| 292 } | 300 } |
| 293 | 301 |
| 294 } // namespace content | 302 } // namespace content |
| OLD | NEW |