OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #include "base/debug/debugger.h" | 7 #include "base/debug/debugger.h" |
8 #include "chrome/browser/ui/browser_list.h" | 8 #include "chrome/browser/ui/browser_list.h" |
9 #include "chrome/browser/metrics/metrics_service.h" | 9 #include "chrome/browser/metrics/metrics_service.h" |
10 #include "content/browser/browser_thread.h" | 10 #include "content/browser/browser_thread.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // to get the error. We can't call shutdown from this thread without | 48 // to get the error. We can't call shutdown from this thread without |
49 // tripping an error. Doing it through a function so that we'll be able | 49 // tripping an error. Doing it through a function so that we'll be able |
50 // to see it in any crash dumps. | 50 // to see it in any crash dumps. |
51 WaitingForUIThreadToHandleIOError(); | 51 WaitingForUIThreadToHandleIOError(); |
52 return 0; | 52 return 0; |
53 } | 53 } |
54 // If there's an IO error it likely means the X server has gone away | 54 // If there's an IO error it likely means the X server has gone away |
55 if (!g_in_x11_io_error_handler) { | 55 if (!g_in_x11_io_error_handler) { |
56 g_in_x11_io_error_handler = true; | 56 g_in_x11_io_error_handler = true; |
57 LOG(ERROR) << "X IO Error detected"; | 57 LOG(ERROR) << "X IO Error detected"; |
58 BrowserList::SessionEnding(); | 58 BrowserList::SessionEnding(browser_shutdown::SHUTDOWN_WIHTOUT_CLOSE); |
59 } | 59 } |
60 | 60 |
61 return 0; | 61 return 0; |
62 } | 62 } |
63 | 63 |
64 } // namespace | 64 } // namespace |
65 | 65 |
66 void RecordBreakpadStatusUMA(MetricsService* metrics) { | 66 void RecordBreakpadStatusUMA(MetricsService* metrics) { |
67 #if defined(USE_LINUX_BREAKPAD) | 67 #if defined(USE_LINUX_BREAKPAD) |
68 metrics->RecordBreakpadRegistration(IsCrashReporterEnabled()); | 68 metrics->RecordBreakpadRegistration(IsCrashReporterEnabled()); |
(...skipping 26 matching lines...) Expand all Loading... |
95 } | 95 } |
96 | 96 |
97 void PrepareRestartOnCrashEnviroment(const CommandLine &parsed_command_line) { | 97 void PrepareRestartOnCrashEnviroment(const CommandLine &parsed_command_line) { |
98 } | 98 } |
99 | 99 |
100 void SetBrowserX11ErrorHandlers() { | 100 void SetBrowserX11ErrorHandlers() { |
101 // Set up error handlers to make sure profile gets written if X server | 101 // Set up error handlers to make sure profile gets written if X server |
102 // goes away. | 102 // goes away. |
103 ui::SetX11ErrorHandlers(BrowserX11ErrorHandler, BrowserX11IOErrorHandler); | 103 ui::SetX11ErrorHandlers(BrowserX11ErrorHandler, BrowserX11IOErrorHandler); |
104 } | 104 } |
OLD | NEW |