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

Side by Side Diff: chrome/browser/ui/browser_list.cc

Issue 8477004: Have content/ create and destroy its own threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: With this patchset, Chrome runs and exits normally on Linux. Created 9 years, 1 month 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/ui/browser_list.h" 5 #include "chrome/browser/ui/browser_list.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 BrowserList::CloseAllBrowsers(); 561 BrowserList::CloseAllBrowsers();
562 562
563 // Send out notification. This is used during testing so that the test harness 563 // Send out notification. This is used during testing so that the test harness
564 // can properly shutdown before we exit. 564 // can properly shutdown before we exit.
565 content::NotificationService::current()->Notify( 565 content::NotificationService::current()->Notify(
566 chrome::NOTIFICATION_SESSION_END, 566 chrome::NOTIFICATION_SESSION_END,
567 content::NotificationService::AllSources(), 567 content::NotificationService::AllSources(),
568 content::NotificationService::NoDetails()); 568 content::NotificationService::NoDetails());
569 569
570 // And shutdown. 570 // And shutdown.
571 browser_shutdown::Shutdown(); 571 // TODO(joi): DO NOT SUBMIT - just seeing what breaks.
572 //browser_shutdown::Shutdown();
572 } 573 }
573 574
574 // static 575 // static
575 void BrowserList::SessionEnding() { 576 void BrowserList::SessionEnding() {
576 TimeLimitedSessionEnding(); 577 TimeLimitedSessionEnding();
577 578
578 #if defined(OS_WIN) 579 #if defined(OS_WIN)
579 // At this point the message loop is still running yet we've shut everything 580 // At this point the message loop is still running yet we've shut everything
580 // down. If any messages are processed we'll likely crash. Exit now. 581 // down. If any messages are processed we'll likely crash. Exit now.
581 ExitProcess(content::RESULT_CODE_NORMAL_EXIT); 582 ExitProcess(content::RESULT_CODE_NORMAL_EXIT);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 // If no more TabContents from Browsers, check the BackgroundPrintingManager. 816 // If no more TabContents from Browsers, check the BackgroundPrintingManager.
816 while (bg_printing_iterator_ != GetBackgroundPrintingManager()->end()) { 817 while (bg_printing_iterator_ != GetBackgroundPrintingManager()->end()) {
817 cur_ = *bg_printing_iterator_; 818 cur_ = *bg_printing_iterator_;
818 CHECK(cur_); 819 CHECK(cur_);
819 ++bg_printing_iterator_; 820 ++bg_printing_iterator_;
820 return; 821 return;
821 } 822 }
822 // Reached the end - no more TabContents. 823 // Reached the end - no more TabContents.
823 cur_ = NULL; 824 cur_ = NULL;
824 } 825 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698