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

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

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 __lsan_do_leak_check(); 394 __lsan_do_leak_check();
395 #endif 395 #endif
396 396
397 CHECK(base::MessageLoop::current()->is_running()); 397 CHECK(base::MessageLoop::current()->is_running());
398 398
399 #if defined(OS_MACOSX) 399 #if defined(OS_MACOSX)
400 base::MessageLoop::current()->PostTask( 400 base::MessageLoop::current()->PostTask(
401 FROM_HERE, 401 FROM_HERE,
402 base::Bind(ChromeBrowserMainPartsMac::DidEndMainMessageLoop)); 402 base::Bind(ChromeBrowserMainPartsMac::DidEndMainMessageLoop));
403 #endif 403 #endif
404 base::MessageLoop::current()->Quit(); 404 base::MessageLoop::current()->QuitWhenIdle();
405 } 405 }
406 return module_ref_count_; 406 return module_ref_count_;
407 } 407 }
408 408
409 namespace { 409 namespace {
410 410
411 // Used at the end of session to block the UI thread for completion of sentinel 411 // Used at the end of session to block the UI thread for completion of sentinel
412 // tasks on the set of threads used to persist profile data and local state. 412 // tasks on the set of threads used to persist profile data and local state.
413 // This is done to ensure that the data has been persisted to disk before 413 // This is done to ensure that the data has been persisted to disk before
414 // continuing. 414 // continuing.
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 } 1279 }
1280 1280
1281 void BrowserProcessImpl::OnAutoupdateTimer() { 1281 void BrowserProcessImpl::OnAutoupdateTimer() {
1282 if (CanAutorestartForUpdate()) { 1282 if (CanAutorestartForUpdate()) {
1283 DLOG(WARNING) << "Detected update. Restarting browser."; 1283 DLOG(WARNING) << "Detected update. Restarting browser.";
1284 RestartBackgroundInstance(); 1284 RestartBackgroundInstance();
1285 } 1285 }
1286 } 1286 }
1287 1287
1288 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1288 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698