| OLD | NEW |
| 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 DCHECK_NE(0u, module_ref_count_); | 304 DCHECK_NE(0u, module_ref_count_); |
| 305 module_ref_count_--; | 305 module_ref_count_--; |
| 306 if (0 == module_ref_count_) { | 306 if (0 == module_ref_count_) { |
| 307 // Allow UI and IO threads to do blocking IO on shutdown, since we do a lot | 307 // Allow UI and IO threads to do blocking IO on shutdown, since we do a lot |
| 308 // of it on shutdown for valid reasons. | 308 // of it on shutdown for valid reasons. |
| 309 base::ThreadRestrictions::SetIOAllowed(true); | 309 base::ThreadRestrictions::SetIOAllowed(true); |
| 310 io_thread()->message_loop()->PostTask( | 310 io_thread()->message_loop()->PostTask( |
| 311 FROM_HERE, | 311 FROM_HERE, |
| 312 NewRunnableFunction(&base::ThreadRestrictions::SetIOAllowed, true)); | 312 NewRunnableFunction(&base::ThreadRestrictions::SetIOAllowed, true)); |
| 313 MessageLoop::current()->PostTask( | 313 MessageLoop::current()->PostTask( |
| 314 FROM_HERE, NewRunnableFunction(DidEndMainMessageLoop)); | 314 FROM_HERE, NewRunnableFunction(content::DidEndMainMessageLoop)); |
| 315 MessageLoop::current()->Quit(); | 315 MessageLoop::current()->Quit(); |
| 316 } | 316 } |
| 317 return module_ref_count_; | 317 return module_ref_count_; |
| 318 } | 318 } |
| 319 | 319 |
| 320 void BrowserProcessImpl::EndSession() { | 320 void BrowserProcessImpl::EndSession() { |
| 321 // Mark all the profiles as clean. | 321 // Mark all the profiles as clean. |
| 322 ProfileManager* pm = profile_manager(); | 322 ProfileManager* pm = profile_manager(); |
| 323 std::vector<Profile*> profiles(pm->GetLoadedProfiles()); | 323 std::vector<Profile*> profiles(pm->GetLoadedProfiles()); |
| 324 for (size_t i = 0; i < profiles.size(); ++i) | 324 for (size_t i = 0; i < profiles.size(); ++i) |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 } | 1099 } |
| 1100 | 1100 |
| 1101 void BrowserProcessImpl::OnAutoupdateTimer() { | 1101 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1102 if (CanAutorestartForUpdate()) { | 1102 if (CanAutorestartForUpdate()) { |
| 1103 DLOG(WARNING) << "Detected update. Restarting browser."; | 1103 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1104 RestartPersistentInstance(); | 1104 RestartPersistentInstance(); |
| 1105 } | 1105 } |
| 1106 } | 1106 } |
| 1107 | 1107 |
| 1108 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1108 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |