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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/debug/debugger.h" | 8 #include "base/debug/debugger.h" |
9 #include "chrome/browser/browser_shutdown.h" | 9 #include "chrome/browser/browser_shutdown.h" |
10 #include "chrome/browser/metrics/metrics_service.h" | 10 #include "chrome/browser/metrics/metrics_service.h" |
11 #include "chrome/browser/ui/browser_list.h" | 11 #include "chrome/browser/ui/browser_list.h" |
12 #include "chrome/common/chrome_result_codes.h" | 12 #include "chrome/common/chrome_result_codes.h" |
13 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
14 #include "ui/base/x/x11_util.h" | 14 #include "ui/base/x/x11_util.h" |
15 #include "ui/base/x/x11_util_internal.h" | 15 #include "ui/base/x/x11_util_internal.h" |
16 | 16 |
17 #if defined(USE_LINUX_BREAKPAD) | 17 #if defined(USE_POSIX_BREAKPAD) |
18 #include "chrome/app/breakpad_linux.h" | 18 #include "chrome/app/breakpad_posix.h" |
19 #endif | 19 #endif |
20 | 20 |
21 using content::BrowserThread; | 21 using content::BrowserThread; |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // Indicates that we're currently responding to an IO error (by shutting down). | 25 // Indicates that we're currently responding to an IO error (by shutting down). |
26 bool g_in_x11_io_error_handler = false; | 26 bool g_in_x11_io_error_handler = false; |
27 | 27 |
28 // Number of seconds to wait for UI thread to get an IO error if we get it on | 28 // Number of seconds to wait for UI thread to get an IO error if we get it on |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 browser_shutdown::SetShuttingDownWithoutClosingBrowsers(true); | 62 browser_shutdown::SetShuttingDownWithoutClosingBrowsers(true); |
63 BrowserList::SessionEnding(); | 63 BrowserList::SessionEnding(); |
64 } | 64 } |
65 | 65 |
66 return 0; | 66 return 0; |
67 } | 67 } |
68 | 68 |
69 } // namespace | 69 } // namespace |
70 | 70 |
71 void RecordBreakpadStatusUMA(MetricsService* metrics) { | 71 void RecordBreakpadStatusUMA(MetricsService* metrics) { |
72 #if defined(USE_LINUX_BREAKPAD) | 72 #if defined(USE_POSIX_BREAKPAD) |
73 metrics->RecordBreakpadRegistration(IsCrashReporterEnabled()); | 73 metrics->RecordBreakpadRegistration(IsCrashReporterEnabled()); |
74 #else | 74 #else |
75 metrics->RecordBreakpadRegistration(false); | 75 metrics->RecordBreakpadRegistration(false); |
76 #endif | 76 #endif |
77 metrics->RecordBreakpadHasDebugger(base::debug::BeingDebugged()); | 77 metrics->RecordBreakpadHasDebugger(base::debug::BeingDebugged()); |
78 } | 78 } |
79 | 79 |
80 void WarnAboutMinimumSystemRequirements() { | 80 void WarnAboutMinimumSystemRequirements() { |
81 // Nothing to warn about on X11 right now. | 81 // Nothing to warn about on X11 right now. |
82 } | 82 } |
83 | 83 |
84 void RecordBrowserStartupTime() { | 84 void RecordBrowserStartupTime() { |
85 // Not implemented on X11 for now. | 85 // Not implemented on X11 for now. |
86 } | 86 } |
87 | 87 |
88 // From browser_main_win.h, stubs until we figure out the right thing... | 88 // From browser_main_win.h, stubs until we figure out the right thing... |
89 | 89 |
90 int DoUninstallTasks(bool chrome_still_running) { | 90 int DoUninstallTasks(bool chrome_still_running) { |
91 return content::RESULT_CODE_NORMAL_EXIT; | 91 return content::RESULT_CODE_NORMAL_EXIT; |
92 } | 92 } |
93 | 93 |
94 void SetBrowserX11ErrorHandlers() { | 94 void SetBrowserX11ErrorHandlers() { |
95 // Set up error handlers to make sure profile gets written if X server | 95 // Set up error handlers to make sure profile gets written if X server |
96 // goes away. | 96 // goes away. |
97 ui::SetX11ErrorHandlers(BrowserX11ErrorHandler, BrowserX11IOErrorHandler); | 97 ui::SetX11ErrorHandlers(BrowserX11ErrorHandler, BrowserX11IOErrorHandler); |
98 } | 98 } |
OLD | NEW |