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

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

Issue 7903019: Revert DidEndMainMessageLoop changes from my earlier checkin since they caused issues on Mac. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 DCHECK(CalledOnValidThread()); 311 DCHECK(CalledOnValidThread());
312 DCHECK_NE(0u, module_ref_count_); 312 DCHECK_NE(0u, module_ref_count_);
313 module_ref_count_--; 313 module_ref_count_--;
314 if (0 == module_ref_count_) { 314 if (0 == module_ref_count_) {
315 // Allow UI and IO threads to do blocking IO on shutdown, since we do a lot 315 // Allow UI and IO threads to do blocking IO on shutdown, since we do a lot
316 // of it on shutdown for valid reasons. 316 // of it on shutdown for valid reasons.
317 base::ThreadRestrictions::SetIOAllowed(true); 317 base::ThreadRestrictions::SetIOAllowed(true);
318 io_thread()->message_loop()->PostTask( 318 io_thread()->message_loop()->PostTask(
319 FROM_HERE, 319 FROM_HERE,
320 NewRunnableFunction(&base::ThreadRestrictions::SetIOAllowed, true)); 320 NewRunnableFunction(&base::ThreadRestrictions::SetIOAllowed, true));
321 MessageLoop::current()->PostTask(
322 FROM_HERE, NewRunnableFunction(content::DidEndMainMessageLoop));
321 MessageLoop::current()->Quit(); 323 MessageLoop::current()->Quit();
322 } 324 }
323 return module_ref_count_; 325 return module_ref_count_;
324 } 326 }
325 327
326 void BrowserProcessImpl::EndSession() { 328 void BrowserProcessImpl::EndSession() {
327 // Mark all the profiles as clean. 329 // Mark all the profiles as clean.
328 ProfileManager* pm = profile_manager(); 330 ProfileManager* pm = profile_manager();
329 std::vector<Profile*> profiles(pm->GetLoadedProfiles()); 331 std::vector<Profile*> profiles(pm->GetLoadedProfiles());
330 for (size_t i = 0; i < profiles.size(); ++i) 332 for (size_t i = 0; i < profiles.size(); ++i)
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 } 1119 }
1118 1120
1119 void BrowserProcessImpl::OnAutoupdateTimer() { 1121 void BrowserProcessImpl::OnAutoupdateTimer() {
1120 if (CanAutorestartForUpdate()) { 1122 if (CanAutorestartForUpdate()) {
1121 DLOG(WARNING) << "Detected update. Restarting browser."; 1123 DLOG(WARNING) << "Detected update. Restarting browser.";
1122 RestartPersistentInstance(); 1124 RestartPersistentInstance();
1123 } 1125 }
1124 } 1126 }
1125 1127
1126 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1128 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698