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

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

Issue 8262009: Chrome OS: Shutdown without blocking when SIGTERM is received. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/ui/browser_list.cc » ('j') | 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) 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/browser_shutdown.h"
8 #include "chrome/browser/ui/browser_list.h" 9 #include "chrome/browser/ui/browser_list.h"
9 #include "chrome/browser/metrics/metrics_service.h" 10 #include "chrome/browser/metrics/metrics_service.h"
10 #include "content/browser/browser_thread.h" 11 #include "content/browser/browser_thread.h"
11 #include "chrome/common/chrome_result_codes.h" 12 #include "chrome/common/chrome_result_codes.h"
12 #include "ui/base/x/x11_util.h" 13 #include "ui/base/x/x11_util.h"
13 #include "ui/base/x/x11_util_internal.h" 14 #include "ui/base/x/x11_util_internal.h"
14 15
15 #if defined(USE_LINUX_BREAKPAD) 16 #if defined(USE_LINUX_BREAKPAD)
16 #include "chrome/app/breakpad_linux.h" 17 #include "chrome/app/breakpad_linux.h"
17 #endif 18 #endif
(...skipping 30 matching lines...) Expand all
48 // to get the error. We can't call shutdown from this thread without 49 // 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 50 // tripping an error. Doing it through a function so that we'll be able
50 // to see it in any crash dumps. 51 // to see it in any crash dumps.
51 WaitingForUIThreadToHandleIOError(); 52 WaitingForUIThreadToHandleIOError();
52 return 0; 53 return 0;
53 } 54 }
54 // If there's an IO error it likely means the X server has gone away 55 // If there's an IO error it likely means the X server has gone away
55 if (!g_in_x11_io_error_handler) { 56 if (!g_in_x11_io_error_handler) {
56 g_in_x11_io_error_handler = true; 57 g_in_x11_io_error_handler = true;
57 LOG(ERROR) << "X IO Error detected"; 58 LOG(ERROR) << "X IO Error detected";
59 browser_shutdown::SetShuttingDownWithoutClosingBrowsers(true);
58 BrowserList::SessionEnding(); 60 BrowserList::SessionEnding();
59 } 61 }
60 62
61 return 0; 63 return 0;
62 } 64 }
63 65
64 } // namespace 66 } // namespace
65 67
66 void RecordBreakpadStatusUMA(MetricsService* metrics) { 68 void RecordBreakpadStatusUMA(MetricsService* metrics) {
67 #if defined(USE_LINUX_BREAKPAD) 69 #if defined(USE_LINUX_BREAKPAD)
(...skipping 27 matching lines...) Expand all
95 } 97 }
96 98
97 void PrepareRestartOnCrashEnviroment(const CommandLine &parsed_command_line) { 99 void PrepareRestartOnCrashEnviroment(const CommandLine &parsed_command_line) {
98 } 100 }
99 101
100 void SetBrowserX11ErrorHandlers() { 102 void SetBrowserX11ErrorHandlers() {
101 // Set up error handlers to make sure profile gets written if X server 103 // Set up error handlers to make sure profile gets written if X server
102 // goes away. 104 // goes away.
103 ui::SetX11ErrorHandlers(BrowserX11ErrorHandler, BrowserX11IOErrorHandler); 105 ui::SetX11ErrorHandlers(BrowserX11ErrorHandler, BrowserX11IOErrorHandler);
104 } 106 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/ui/browser_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698