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/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 Loading... |
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 Loading... |
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) |
OLD | NEW |