Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: content/shell/app/shell_main_delegate.cc

Issue 585633002: Rename BreakpadClient to CrashReporterClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/shell/app/shell_crash_reporter_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/path_service.h" 14 #include "base/path_service.h"
15 #include "cc/base/switches.h" 15 #include "cc/base/switches.h"
16 #include "content/public/browser/browser_main_runner.h" 16 #include "content/public/browser/browser_main_runner.h"
17 #include "content/public/common/content_switches.h" 17 #include "content/public/common/content_switches.h"
18 #include "content/public/common/url_constants.h" 18 #include "content/public/common/url_constants.h"
19 #include "content/public/test/layouttest_support.h" 19 #include "content/public/test/layouttest_support.h"
20 #include "content/shell/app/shell_breakpad_client.h" 20 #include "content/shell/app/shell_crash_reporter_client.h"
21 #include "content/shell/app/webkit_test_platform_support.h" 21 #include "content/shell/app/webkit_test_platform_support.h"
22 #include "content/shell/browser/shell_browser_main.h" 22 #include "content/shell/browser/shell_browser_main.h"
23 #include "content/shell/browser/shell_content_browser_client.h" 23 #include "content/shell/browser/shell_content_browser_client.h"
24 #include "content/shell/common/shell_switches.h" 24 #include "content/shell/common/shell_switches.h"
25 #include "content/shell/renderer/shell_content_renderer_client.h" 25 #include "content/shell/renderer/shell_content_renderer_client.h"
26 #include "media/base/media_switches.h" 26 #include "media/base/media_switches.h"
27 #include "net/cookies/cookie_monster.h" 27 #include "net/cookies/cookie_monster.h"
28 #include "ui/base/resource/resource_bundle.h" 28 #include "ui/base/resource/resource_bundle.h"
29 #include "ui/base/ui_base_paths.h" 29 #include "ui/base/ui_base_paths.h"
30 #include "ui/base/ui_base_switches.h" 30 #include "ui/base/ui_base_switches.h"
(...skipping 29 matching lines...) Expand all
60 #include "base/logging_win.h" 60 #include "base/logging_win.h"
61 #include "components/crash/app/breakpad_win.h" 61 #include "components/crash/app/breakpad_win.h"
62 #endif 62 #endif
63 63
64 #if defined(OS_POSIX) && !defined(OS_MACOSX) 64 #if defined(OS_POSIX) && !defined(OS_MACOSX)
65 #include "components/crash/app/breakpad_linux.h" 65 #include "components/crash/app/breakpad_linux.h"
66 #endif 66 #endif
67 67
68 namespace { 68 namespace {
69 69
70 base::LazyInstance<content::ShellBreakpadClient>::Leaky 70 base::LazyInstance<content::ShellCrashReporterClient>::Leaky
71 g_shell_breakpad_client = LAZY_INSTANCE_INITIALIZER; 71 g_shell_crash_client = LAZY_INSTANCE_INITIALIZER;
72 72
73 #if defined(OS_WIN) 73 #if defined(OS_WIN)
74 // If "Content Shell" doesn't show up in your list of trace providers in 74 // If "Content Shell" doesn't show up in your list of trace providers in
75 // Sawbuck, add these registry entries to your machine (NOTE the optional 75 // Sawbuck, add these registry entries to your machine (NOTE the optional
76 // Wow6432Node key for x64 machines): 76 // Wow6432Node key for x64 machines):
77 // 1. Find: HKLM\SOFTWARE\[Wow6432Node\]Google\Sawbuck\Providers 77 // 1. Find: HKLM\SOFTWARE\[Wow6432Node\]Google\Sawbuck\Providers
78 // 2. Add a subkey with the name "{6A3E50A4-7E15-4099-8413-EC94D8C2A4B6}" 78 // 2. Add a subkey with the name "{6A3E50A4-7E15-4099-8413-EC94D8C2A4B6}"
79 // 3. Add these values: 79 // 3. Add these values:
80 // "default_flags"=dword:00000001 80 // "default_flags"=dword:00000001
81 // "default_level"=dword:00000004 81 // "default_level"=dword:00000004
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 #if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX)) 199 #if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX))
200 // Create an instance of the CPU class to parse /proc/cpuinfo and cache 200 // Create an instance of the CPU class to parse /proc/cpuinfo and cache
201 // cpu_brand info. 201 // cpu_brand info.
202 base::CPU cpu_info; 202 base::CPU cpu_info;
203 #endif 203 #endif
204 if (CommandLine::ForCurrentProcess()->HasSwitch( 204 if (CommandLine::ForCurrentProcess()->HasSwitch(
205 switches::kEnableCrashReporter)) { 205 switches::kEnableCrashReporter)) {
206 std::string process_type = 206 std::string process_type =
207 CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 207 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
208 switches::kProcessType); 208 switches::kProcessType);
209 breakpad::SetBreakpadClient(g_shell_breakpad_client.Pointer()); 209 crash_reporter::SetCrashReporterClient(g_shell_crash_client.Pointer());
210 #if defined(OS_MACOSX) 210 #if defined(OS_MACOSX)
211 base::mac::DisableOSCrashDumps(); 211 base::mac::DisableOSCrashDumps();
212 breakpad::InitCrashReporter(process_type); 212 breakpad::InitCrashReporter(process_type);
213 breakpad::InitCrashProcessInfo(process_type); 213 breakpad::InitCrashProcessInfo(process_type);
214 #elif defined(OS_POSIX) && !defined(OS_MACOSX) 214 #elif defined(OS_POSIX) && !defined(OS_MACOSX)
215 if (process_type != switches::kZygoteProcess) { 215 if (process_type != switches::kZygoteProcess) {
216 #if defined(OS_ANDROID) 216 #if defined(OS_ANDROID)
217 if (process_type.empty()) 217 if (process_type.empty())
218 breakpad::InitCrashReporter(process_type); 218 breakpad::InitCrashReporter(process_type);
219 else 219 else
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 browser_client_.reset(new ShellContentBrowserClient); 302 browser_client_.reset(new ShellContentBrowserClient);
303 return browser_client_.get(); 303 return browser_client_.get();
304 } 304 }
305 305
306 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { 306 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() {
307 renderer_client_.reset(new ShellContentRendererClient); 307 renderer_client_.reset(new ShellContentRendererClient);
308 return renderer_client_.get(); 308 return renderer_client_.get();
309 } 309 }
310 310
311 } // namespace content 311 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/app/shell_crash_reporter_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698