OLD | NEW |
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 "chrome/browser/chrome_browser_main_posix.h" | 5 #include "chrome/browser/chrome_browser_main_posix.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <pthread.h> | 8 #include <pthread.h> |
9 #include <signal.h> | 9 #include <signal.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 ExitHandler::~ExitHandler() { | 81 ExitHandler::~ExitHandler() { |
82 } | 82 } |
83 | 83 |
84 void ExitHandler::OnSessionRestoreDone(int /* num_tabs */) { | 84 void ExitHandler::OnSessionRestoreDone(int /* num_tabs */) { |
85 if (!SessionRestore::IsRestoringSynchronously()) { | 85 if (!SessionRestore::IsRestoringSynchronously()) { |
86 // At this point the message loop may not be running (meaning we haven't | 86 // At this point the message loop may not be running (meaning we haven't |
87 // gotten through browser startup, but are close). Post the task to at which | 87 // gotten through browser startup, but are close). Post the task to at which |
88 // point the message loop is running. | 88 // point the message loop is running. |
89 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 89 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
90 base::Bind(&ExitHandler::Exit)); | 90 base::BindOnce(&ExitHandler::Exit)); |
91 delete this; | 91 delete this; |
92 } | 92 } |
93 } | 93 } |
94 | 94 |
95 // static | 95 // static |
96 void ExitHandler::Exit() { | 96 void ExitHandler::Exit() { |
97 #if defined(OS_CHROMEOS) | 97 #if defined(OS_CHROMEOS) |
98 // On ChromeOS, exiting on signal should be always clean. | 98 // On ChromeOS, exiting on signal should be always clean. |
99 chrome::ExitCleanly(); | 99 chrome::ExitCleanly(); |
100 #else | 100 #else |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // Not called on Mac because we load the locale files differently. | 138 // Not called on Mac because we load the locale files differently. |
139 NOTREACHED(); | 139 NOTREACHED(); |
140 #elif defined(USE_AURA) | 140 #elif defined(USE_AURA) |
141 // TODO(port): We may want a views based message dialog here eventually, but | 141 // TODO(port): We may want a views based message dialog here eventually, but |
142 // for now, crash. | 142 // for now, crash. |
143 NOTREACHED(); | 143 NOTREACHED(); |
144 #else | 144 #else |
145 #error "Need MessageBox implementation." | 145 #error "Need MessageBox implementation." |
146 #endif | 146 #endif |
147 } | 147 } |
OLD | NEW |