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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 if (exit_code) | 180 if (exit_code) |
180 *exit_code = 1; | 181 *exit_code = 1; |
181 return true; | 182 return true; |
182 } | 183 } |
183 } | 184 } |
184 SetContentClient(&content_client_); | 185 SetContentClient(&content_client_); |
185 return false; | 186 return false; |
186 } | 187 } |
187 | 188 |
188 void ShellMainDelegate::PreSandboxStartup() { | 189 void ShellMainDelegate::PreSandboxStartup() { |
| 190 #if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX)) |
| 191 // Create an instance of the CPU class to parse /proc/cpuinfo and cache |
| 192 // cpu_brand info. |
| 193 base::CPU cpu_info; |
| 194 #endif |
189 if (CommandLine::ForCurrentProcess()->HasSwitch( | 195 if (CommandLine::ForCurrentProcess()->HasSwitch( |
190 switches::kEnableCrashReporter)) { | 196 switches::kEnableCrashReporter)) { |
191 std::string process_type = | 197 std::string process_type = |
192 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 198 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
193 switches::kProcessType); | 199 switches::kProcessType); |
194 breakpad::SetBreakpadClient(g_shell_breakpad_client.Pointer()); | 200 breakpad::SetBreakpadClient(g_shell_breakpad_client.Pointer()); |
195 #if defined(OS_MACOSX) | 201 #if defined(OS_MACOSX) |
196 base::mac::DisableOSCrashDumps(); | 202 base::mac::DisableOSCrashDumps(); |
197 breakpad::InitCrashReporter(process_type); | 203 breakpad::InitCrashReporter(process_type); |
198 breakpad::InitCrashProcessInfo(process_type); | 204 breakpad::InitCrashProcessInfo(process_type); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 browser_client_.reset(new ShellContentBrowserClient); | 292 browser_client_.reset(new ShellContentBrowserClient); |
287 return browser_client_.get(); | 293 return browser_client_.get(); |
288 } | 294 } |
289 | 295 |
290 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { | 296 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { |
291 renderer_client_.reset(new ShellContentRendererClient); | 297 renderer_client_.reset(new ShellContentRendererClient); |
292 return renderer_client_.get(); | 298 return renderer_client_.get(); |
293 } | 299 } |
294 | 300 |
295 } // namespace content | 301 } // namespace content |
OLD | NEW |