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

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

Issue 8873032: Removing MessageLoop::QuitTask() from chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert 3 more problematic files Created 9 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) 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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 } 302 }
303 } 303 }
304 304
305 #if defined(OS_WIN) 305 #if defined(OS_WIN)
306 // Send a QuitTask to the given MessageLoop when the (file) thread has processed 306 // Send a QuitTask to the given MessageLoop when the (file) thread has processed
307 // our (other) recent requests (to save preferences). 307 // our (other) recent requests (to save preferences).
308 // Change the boolean so that the receiving thread will know that we did indeed 308 // Change the boolean so that the receiving thread will know that we did indeed
309 // send the QuitTask that terminated the message loop. 309 // send the QuitTask that terminated the message loop.
310 static void PostQuit(MessageLoop* message_loop) { 310 static void PostQuit(MessageLoop* message_loop) {
311 g_end_session_file_thread_has_completed = true; 311 g_end_session_file_thread_has_completed = true;
312 message_loop->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 312 message_loop->PostTask(FROM_HERE, MessageLoop::QuitClosure());
313 } 313 }
314 #elif defined(USE_X11) 314 #elif defined(USE_X11)
315 static void Signal(base::WaitableEvent* event) { 315 static void Signal(base::WaitableEvent* event) {
316 event->Signal(); 316 event->Signal();
317 } 317 }
318 #endif 318 #endif
319 319
320 unsigned int BrowserProcessImpl::AddRefModule() { 320 unsigned int BrowserProcessImpl::AddRefModule() {
321 DCHECK(CalledOnValidThread()); 321 DCHECK(CalledOnValidThread());
322 CHECK(!IsShuttingDown()); 322 CHECK(!IsShuttingDown());
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 #elif defined(OS_WIN) 385 #elif defined(OS_WIN)
386 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 386 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
387 base::Bind(PostQuit, MessageLoop::current())); 387 base::Bind(PostQuit, MessageLoop::current()));
388 int quits_received = 0; 388 int quits_received = 0;
389 do { 389 do {
390 MessageLoop::current()->Run(); 390 MessageLoop::current()->Run();
391 ++quits_received; 391 ++quits_received;
392 } while (!g_end_session_file_thread_has_completed); 392 } while (!g_end_session_file_thread_has_completed);
393 // If we did get extra quits, then we should re-post them to the message loop. 393 // If we did get extra quits, then we should re-post them to the message loop.
394 while (--quits_received > 0) 394 while (--quits_received > 0)
395 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 395 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
396 #else 396 #else
397 NOTIMPLEMENTED(); 397 NOTIMPLEMENTED();
398 #endif 398 #endif
399 } 399 }
400 400
401 ResourceDispatcherHost* BrowserProcessImpl::resource_dispatcher_host() { 401 ResourceDispatcherHost* BrowserProcessImpl::resource_dispatcher_host() {
402 DCHECK(CalledOnValidThread()); 402 DCHECK(CalledOnValidThread());
403 if (!created_resource_dispatcher_host_) 403 if (!created_resource_dispatcher_host_)
404 CreateResourceDispatcherHost(); 404 CreateResourceDispatcherHost();
405 return resource_dispatcher_host_.get(); 405 return resource_dispatcher_host_.get();
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 } 977 }
978 978
979 void BrowserProcessImpl::OnAutoupdateTimer() { 979 void BrowserProcessImpl::OnAutoupdateTimer() {
980 if (CanAutorestartForUpdate()) { 980 if (CanAutorestartForUpdate()) {
981 DLOG(WARNING) << "Detected update. Restarting browser."; 981 DLOG(WARNING) << "Detected update. Restarting browser.";
982 RestartBackgroundInstance(); 982 RestartBackgroundInstance();
983 } 983 }
984 } 984 }
985 985
986 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 986 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/browser_focus_uitest.cc ('k') | chrome/browser/chromeos/login/mock_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698