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) && defined(OS_ANDROID) | |
|
rptr
2014/03/08 13:03:06
This initializes cpu brand info only for content s
| |
| 190 base::CPU::CpuBrandInfo(); | |
| 191 #endif | |
| 188 if (CommandLine::ForCurrentProcess()->HasSwitch( | 192 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 189 switches::kEnableCrashReporter)) { | 193 switches::kEnableCrashReporter)) { |
| 190 std::string process_type = | 194 std::string process_type = |
| 191 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 195 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 192 switches::kProcessType); | 196 switches::kProcessType); |
| 193 breakpad::SetBreakpadClient(g_shell_breakpad_client.Pointer()); | 197 breakpad::SetBreakpadClient(g_shell_breakpad_client.Pointer()); |
| 194 #if defined(OS_MACOSX) | 198 #if defined(OS_MACOSX) |
| 195 base::mac::DisableOSCrashDumps(); | 199 base::mac::DisableOSCrashDumps(); |
| 196 breakpad::InitCrashReporter(process_type); | 200 breakpad::InitCrashReporter(process_type); |
| 197 breakpad::InitCrashProcessInfo(process_type); | 201 breakpad::InitCrashProcessInfo(process_type); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 browser_client_.reset(new ShellContentBrowserClient); | 289 browser_client_.reset(new ShellContentBrowserClient); |
| 286 return browser_client_.get(); | 290 return browser_client_.get(); |
| 287 } | 291 } |
| 288 | 292 |
| 289 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 293 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
| 290 renderer_client_.reset(new ShellContentRendererClient); | 294 renderer_client_.reset(new ShellContentRendererClient); |
| 291 return renderer_client_.get(); | 295 return renderer_client_.get(); |
| 292 } | 296 } |
| 293 | 297 |
| 294 } // namespace content | 298 } // namespace content |
| OLD | NEW |