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

Side by Side Diff: chrome/browser/crash_handler_host_linux.cc

Issue 5519016: Add a new GetInstance() method for singleton classes used in chrome/browser files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/crash_handler_host_linux.h" 5 #include "chrome/browser/crash_handler_host_linux.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <sys/syscall.h> 10 #include <sys/syscall.h>
11 #include <sys/types.h> 11 #include <sys/types.h>
12 #include <unistd.h> 12 #include <unistd.h>
13 13
14 #include "base/eintr_wrapper.h" 14 #include "base/eintr_wrapper.h"
15 #include "base/file_path.h" 15 #include "base/file_path.h"
16 #include "base/format_macros.h" 16 #include "base/format_macros.h"
17 #include "base/linux_util.h" 17 #include "base/linux_util.h"
18 #include "base/logging.h" 18 #include "base/logging.h"
19 #include "base/message_loop.h" 19 #include "base/message_loop.h"
20 #include "base/path_service.h" 20 #include "base/path_service.h"
21 #include "base/rand_util.h" 21 #include "base/rand_util.h"
22 #include "base/singleton.h"
22 #include "base/string_util.h" 23 #include "base/string_util.h"
23 #include "base/task.h" 24 #include "base/task.h"
24 #include "base/thread.h" 25 #include "base/thread.h"
25 #include "breakpad/src/client/linux/handler/exception_handler.h" 26 #include "breakpad/src/client/linux/handler/exception_handler.h"
26 #include "breakpad/src/client/linux/minidump_writer/linux_dumper.h" 27 #include "breakpad/src/client/linux/minidump_writer/linux_dumper.h"
27 #include "breakpad/src/client/linux/minidump_writer/minidump_writer.h" 28 #include "breakpad/src/client/linux/minidump_writer/minidump_writer.h"
28 #include "chrome/app/breakpad_linux.h" 29 #include "chrome/app/breakpad_linux.h"
29 #include "chrome/browser/browser_thread.h" 30 #include "chrome/browser/browser_thread.h"
30 #include "chrome/common/chrome_paths.h" 31 #include "chrome/common/chrome_paths.h"
31 #include "chrome/common/env_vars.h" 32 #include "chrome/common/env_vars.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 InitCrashUploaderThread(); 358 InitCrashUploaderThread();
358 } 359 }
359 360
360 PluginCrashHandlerHostLinux::~PluginCrashHandlerHostLinux() { 361 PluginCrashHandlerHostLinux::~PluginCrashHandlerHostLinux() {
361 } 362 }
362 363
363 void PluginCrashHandlerHostLinux::SetProcessType() { 364 void PluginCrashHandlerHostLinux::SetProcessType() {
364 process_type_ = "plugin"; 365 process_type_ = "plugin";
365 } 366 }
366 367
368 // static
369 PluginCrashHandlerHostLinux* PluginCrashHandlerHostLinux::GetInstance() {
370 return Singleton<PluginCrashHandlerHostLinux>::get();
371 }
372
367 RendererCrashHandlerHostLinux::RendererCrashHandlerHostLinux() { 373 RendererCrashHandlerHostLinux::RendererCrashHandlerHostLinux() {
368 InitCrashUploaderThread(); 374 InitCrashUploaderThread();
369 } 375 }
370 376
371 RendererCrashHandlerHostLinux::~RendererCrashHandlerHostLinux() { 377 RendererCrashHandlerHostLinux::~RendererCrashHandlerHostLinux() {
372 } 378 }
373 379
374 void RendererCrashHandlerHostLinux::SetProcessType() { 380 void RendererCrashHandlerHostLinux::SetProcessType() {
375 process_type_ = "renderer"; 381 process_type_ = "renderer";
376 } 382 }
383
384 // static
385 RendererCrashHandlerHostLinux* RendererCrashHandlerHostLinux::GetInstance() {
386 return Singleton<RendererCrashHandlerHostLinux>::get();
387 }
OLDNEW
« no previous file with comments | « chrome/browser/crash_handler_host_linux.h ('k') | chrome/browser/crash_handler_host_linux_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698