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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1685 // Start watching for jank during shutdown. It gets disarmed when | 1685 // Start watching for jank during shutdown. It gets disarmed when |
1686 // |shutdown_watcher_| object is destructed. | 1686 // |shutdown_watcher_| object is destructed. |
1687 shutdown_watcher_->Arm(base::TimeDelta::FromSeconds(300)); | 1687 shutdown_watcher_->Arm(base::TimeDelta::FromSeconds(300)); |
1688 | 1688 |
1689 // Disarm the startup hang detector time bomb if it is still Arm'ed. | 1689 // Disarm the startup hang detector time bomb if it is still Arm'ed. |
1690 startup_watcher_->Disarm(); | 1690 startup_watcher_->Disarm(); |
1691 | 1691 |
1692 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) | 1692 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) |
1693 chrome_extra_parts_[i]->PostMainMessageLoopRun(); | 1693 chrome_extra_parts_[i]->PostMainMessageLoopRun(); |
1694 | 1694 |
1695 // Some tests don't set parameters.ui_task, so they started translate | 1695 // TranslateManager's URL fetchers should be destructed in the main thread |
1696 // language fetch that was never completed so we need to cleanup here | |
1697 // otherwise it will be done by the destructor in a wrong thread. | 1696 // otherwise it will be done by the destructor in a wrong thread. |
1698 if (parameters().ui_task == NULL && translate_manager_ != NULL) | 1697 if (translate_manager_ != NULL) |
1699 translate_manager_->CleanupPendingUlrFetcher(); | 1698 translate_manager_->CleanupPendingUrlFetcher(); |
1700 | 1699 |
1701 if (notify_result_ == ProcessSingleton::PROCESS_NONE) | 1700 if (notify_result_ == ProcessSingleton::PROCESS_NONE) |
1702 process_singleton_->Cleanup(); | 1701 process_singleton_->Cleanup(); |
1703 | 1702 |
1704 // Stop all tasks that might run on WatchDogThread. | 1703 // Stop all tasks that might run on WatchDogThread. |
1705 ThreadWatcherList::StopWatchingAll(); | 1704 ThreadWatcherList::StopWatchingAll(); |
1706 | 1705 |
1707 browser_process_->metrics_service()->Stop(); | 1706 browser_process_->metrics_service()->Stop(); |
1708 | 1707 |
1709 restart_last_session_ = browser_shutdown::ShutdownPreThreadsStop(); | 1708 restart_last_session_ = browser_shutdown::ShutdownPreThreadsStop(); |
(...skipping 26 matching lines...) Expand all Loading... |
1736 chromeos::CrosSettings::Shutdown(); | 1735 chromeos::CrosSettings::Shutdown(); |
1737 #endif | 1736 #endif |
1738 #endif | 1737 #endif |
1739 } | 1738 } |
1740 | 1739 |
1741 // Public members: | 1740 // Public members: |
1742 | 1741 |
1743 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1742 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1744 chrome_extra_parts_.push_back(parts); | 1743 chrome_extra_parts_.push_back(parts); |
1745 } | 1744 } |
OLD | NEW |