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

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

Issue 919183002: Move chromeos::device_event_log into components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed stevenjb's feedback on patch set 2. Created 5 years, 10 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
OLDNEW
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 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 #include "chrome/common/chrome_version_info.h" 98 #include "chrome/common/chrome_version_info.h"
99 #include "chrome/common/crash_keys.h" 99 #include "chrome/common/crash_keys.h"
100 #include "chrome/common/env_vars.h" 100 #include "chrome/common/env_vars.h"
101 #include "chrome/common/logging_chrome.h" 101 #include "chrome/common/logging_chrome.h"
102 #include "chrome/common/net/net_resource_provider.h" 102 #include "chrome/common/net/net_resource_provider.h"
103 #include "chrome/common/pref_names.h" 103 #include "chrome/common/pref_names.h"
104 #include "chrome/common/profiling.h" 104 #include "chrome/common/profiling.h"
105 #include "chrome/grit/generated_resources.h" 105 #include "chrome/grit/generated_resources.h"
106 #include "chrome/installer/util/google_update_settings.h" 106 #include "chrome/installer/util/google_update_settings.h"
107 #include "components/component_updater/component_updater_service.h" 107 #include "components/component_updater/component_updater_service.h"
108 #include "components/device_event_log/device_event_log.h"
108 #include "components/google/core/browser/google_util.h" 109 #include "components/google/core/browser/google_util.h"
109 #include "components/language_usage_metrics/language_usage_metrics.h" 110 #include "components/language_usage_metrics/language_usage_metrics.h"
110 #include "components/metrics/metrics_service.h" 111 #include "components/metrics/metrics_service.h"
111 #include "components/metrics/profiler/tracking_synchronizer.h" 112 #include "components/metrics/profiler/tracking_synchronizer.h"
112 #include "components/nacl/browser/nacl_browser.h" 113 #include "components/nacl/browser/nacl_browser.h"
113 #include "components/rappor/rappor_service.h" 114 #include "components/rappor/rappor_service.h"
114 #include "components/signin/core/common/profile_management_switches.h" 115 #include "components/signin/core/common/profile_management_switches.h"
115 #include "components/startup_metric_utils/startup_metric_utils.h" 116 #include "components/startup_metric_utils/startup_metric_utils.h"
116 #include "components/translate/content/browser/browser_cld_utils.h" 117 #include "components/translate/content/browser/browser_cld_utils.h"
117 #include "components/translate/content/common/cld_data_source.h" 118 #include "components/translate/content/common/cld_data_source.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 } 754 }
754 755
755 void ChromeBrowserMainParts::ToolkitInitialized() { 756 void ChromeBrowserMainParts::ToolkitInitialized() {
756 TRACE_EVENT0("startup", "ChromeBrowserMainParts::ToolkitInitialized"); 757 TRACE_EVENT0("startup", "ChromeBrowserMainParts::ToolkitInitialized");
757 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) 758 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
758 chrome_extra_parts_[i]->ToolkitInitialized(); 759 chrome_extra_parts_[i]->ToolkitInitialized();
759 } 760 }
760 761
761 void ChromeBrowserMainParts::PreMainMessageLoopStart() { 762 void ChromeBrowserMainParts::PreMainMessageLoopStart() {
762 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopStart"); 763 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopStart");
764
765 device_event_log::Initialize(0 /* default max entries */);
766
763 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) 767 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
764 chrome_extra_parts_[i]->PreMainMessageLoopStart(); 768 chrome_extra_parts_[i]->PreMainMessageLoopStart();
765 } 769 }
766 770
767 void ChromeBrowserMainParts::PostMainMessageLoopStart() { 771 void ChromeBrowserMainParts::PostMainMessageLoopStart() {
768 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostMainMessageLoopStart"); 772 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostMainMessageLoopStart");
769 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) 773 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
770 chrome_extra_parts_[i]->PostMainMessageLoopStart(); 774 chrome_extra_parts_[i]->PostMainMessageLoopStart();
771 } 775 }
772 776
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 TranslateService::Shutdown(parameters().ui_task == NULL); 1688 TranslateService::Shutdown(parameters().ui_task == NULL);
1685 1689
1686 if (notify_result_ == ProcessSingleton::PROCESS_NONE) 1690 if (notify_result_ == ProcessSingleton::PROCESS_NONE)
1687 process_singleton_->Cleanup(); 1691 process_singleton_->Cleanup();
1688 1692
1689 // Stop all tasks that might run on WatchDogThread. 1693 // Stop all tasks that might run on WatchDogThread.
1690 ThreadWatcherList::StopWatchingAll(); 1694 ThreadWatcherList::StopWatchingAll();
1691 1695
1692 browser_process_->metrics_service()->Stop(); 1696 browser_process_->metrics_service()->Stop();
1693 1697
1698 device_event_log::Shutdown();
stevenjb 2015/02/17 21:29:51 Lets do this in PostDestryThreads which matches wh
1699
1694 restart_last_session_ = browser_shutdown::ShutdownPreThreadsStop(); 1700 restart_last_session_ = browser_shutdown::ShutdownPreThreadsStop();
1695 browser_process_->StartTearDown(); 1701 browser_process_->StartTearDown();
1696 #endif 1702 #endif
1697 } 1703 }
1698 1704
1699 void ChromeBrowserMainParts::PostDestroyThreads() { 1705 void ChromeBrowserMainParts::PostDestroyThreads() {
1700 #if defined(OS_ANDROID) 1706 #if defined(OS_ANDROID)
1701 // On Android, there is no quit/exit. So the browser's main message loop will 1707 // On Android, there is no quit/exit. So the browser's main message loop will
1702 // not finish. 1708 // not finish.
1703 NOTREACHED(); 1709 NOTREACHED();
(...skipping 17 matching lines...) Expand all
1721 chromeos::CrosSettings::Shutdown(); 1727 chromeos::CrosSettings::Shutdown();
1722 #endif 1728 #endif
1723 #endif 1729 #endif
1724 } 1730 }
1725 1731
1726 // Public members: 1732 // Public members:
1727 1733
1728 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1734 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1729 chrome_extra_parts_.push_back(parts); 1735 chrome_extra_parts_.push_back(parts);
1730 } 1736 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/chromeos/net/network_portal_detector_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698