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

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

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 #include "chrome/browser/translate/translate_service.h" 90 #include "chrome/browser/translate/translate_service.h"
91 #include "chrome/browser/ui/app_list/app_list_service.h" 91 #include "chrome/browser/ui/app_list/app_list_service.h"
92 #include "chrome/browser/ui/browser.h" 92 #include "chrome/browser/ui/browser.h"
93 #include "chrome/browser/ui/browser_finder.h" 93 #include "chrome/browser/ui/browser_finder.h"
94 #include "chrome/browser/ui/host_desktop.h" 94 #include "chrome/browser/ui/host_desktop.h"
95 #include "chrome/browser/ui/startup/bad_flags_prompt.h" 95 #include "chrome/browser/ui/startup/bad_flags_prompt.h"
96 #include "chrome/browser/ui/startup/default_browser_prompt.h" 96 #include "chrome/browser/ui/startup/default_browser_prompt.h"
97 #include "chrome/browser/ui/startup/startup_browser_creator.h" 97 #include "chrome/browser/ui/startup/startup_browser_creator.h"
98 #include "chrome/browser/ui/uma_browsing_activity_observer.h" 98 #include "chrome/browser/ui/uma_browsing_activity_observer.h"
99 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" 99 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
100 #include "chrome/common/channel_info.h"
100 #include "chrome/common/chrome_constants.h" 101 #include "chrome/common/chrome_constants.h"
101 #include "chrome/common/chrome_paths.h" 102 #include "chrome/common/chrome_paths.h"
102 #include "chrome/common/chrome_result_codes.h" 103 #include "chrome/common/chrome_result_codes.h"
103 #include "chrome/common/chrome_switches.h" 104 #include "chrome/common/chrome_switches.h"
104 #include "chrome/common/chrome_version_info.h"
105 #include "chrome/common/crash_keys.h" 105 #include "chrome/common/crash_keys.h"
106 #include "chrome/common/env_vars.h" 106 #include "chrome/common/env_vars.h"
107 #include "chrome/common/logging_chrome.h" 107 #include "chrome/common/logging_chrome.h"
108 #include "chrome/common/net/net_resource_provider.h" 108 #include "chrome/common/net/net_resource_provider.h"
109 #include "chrome/common/pref_names.h" 109 #include "chrome/common/pref_names.h"
110 #include "chrome/common/profiling.h" 110 #include "chrome/common/profiling.h"
111 #include "chrome/common/variations/variations_util.h" 111 #include "chrome/common/variations/variations_util.h"
112 #include "chrome/grit/generated_resources.h" 112 #include "chrome/grit/generated_resources.h"
113 #include "chrome/installer/util/google_update_settings.h" 113 #include "chrome/installer/util/google_update_settings.h"
114 #include "components/component_updater/component_updater_service.h" 114 #include "components/component_updater/component_updater_service.h"
115 #include "components/device_event_log/device_event_log.h" 115 #include "components/device_event_log/device_event_log.h"
116 #include "components/google/core/browser/google_util.h" 116 #include "components/google/core/browser/google_util.h"
117 #include "components/language_usage_metrics/language_usage_metrics.h" 117 #include "components/language_usage_metrics/language_usage_metrics.h"
118 #include "components/metrics/call_stack_profile_metrics_provider.h" 118 #include "components/metrics/call_stack_profile_metrics_provider.h"
119 #include "components/metrics/metrics_service.h" 119 #include "components/metrics/metrics_service.h"
120 #include "components/metrics/profiler/tracking_synchronizer.h" 120 #include "components/metrics/profiler/tracking_synchronizer.h"
121 #include "components/nacl/browser/nacl_browser.h" 121 #include "components/nacl/browser/nacl_browser.h"
122 #include "components/rappor/rappor_service.h" 122 #include "components/rappor/rappor_service.h"
123 #include "components/signin/core/common/profile_management_switches.h" 123 #include "components/signin/core/common/profile_management_switches.h"
124 #include "components/startup_metric_utils/startup_metric_utils.h" 124 #include "components/startup_metric_utils/startup_metric_utils.h"
125 #include "components/translate/content/browser/browser_cld_utils.h" 125 #include "components/translate/content/browser/browser_cld_utils.h"
126 #include "components/translate/content/common/cld_data_source.h" 126 #include "components/translate/content/common/cld_data_source.h"
127 #include "components/translate/core/browser/translate_download_manager.h" 127 #include "components/translate/core/browser/translate_download_manager.h"
128 #include "components/variations/net/variations_http_header_provider.h" 128 #include "components/variations/net/variations_http_header_provider.h"
129 #include "components/variations/variations_associated_data.h" 129 #include "components/variations/variations_associated_data.h"
130 #include "components/version_info/version_info.h"
130 #include "content/public/browser/browser_thread.h" 131 #include "content/public/browser/browser_thread.h"
131 #include "content/public/browser/notification_observer.h" 132 #include "content/public/browser/notification_observer.h"
132 #include "content/public/browser/notification_registrar.h" 133 #include "content/public/browser/notification_registrar.h"
133 #include "content/public/browser/notification_service.h" 134 #include "content/public/browser/notification_service.h"
134 #include "content/public/browser/notification_types.h" 135 #include "content/public/browser/notification_types.h"
135 #include "content/public/browser/power_usage_monitor.h" 136 #include "content/public/browser/power_usage_monitor.h"
136 #include "content/public/browser/site_instance.h" 137 #include "content/public/browser/site_instance.h"
137 #include "content/public/common/content_client.h" 138 #include "content/public/common/content_client.h"
138 #include "content/public/common/content_switches.h" 139 #include "content/public/common/content_switches.h"
139 #include "content/public/common/main_function_params.h" 140 #include "content/public/common/main_function_params.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 670
670 // Initialize FieldTrialSynchronizer system. This is a singleton and is used 671 // Initialize FieldTrialSynchronizer system. This is a singleton and is used
671 // for posting tasks via base::Bind. Its deleted when it goes out of scope. 672 // for posting tasks via base::Bind. Its deleted when it goes out of scope.
672 // Even though base::Bind does AddRef and Release, the object will not be 673 // Even though base::Bind does AddRef and Release, the object will not be
673 // deleted after the Task is executed. 674 // deleted after the Task is executed.
674 field_trial_synchronizer_ = new FieldTrialSynchronizer(); 675 field_trial_synchronizer_ = new FieldTrialSynchronizer();
675 676
676 // Now that field trials have been created, initializes metrics recording. 677 // Now that field trials have been created, initializes metrics recording.
677 metrics->InitializeMetricsRecordingState(); 678 metrics->InitializeMetricsRecordingState();
678 679
679 const version_info::Channel channel = 680 const version_info::Channel channel = chrome::GetChannel();
680 chrome::VersionInfo::GetChannel();
681 681
682 // TODO(dalecurtis): Remove these checks and enable for all channels once we 682 // TODO(dalecurtis): Remove these checks and enable for all channels once we
683 // track down the root causes of crbug.com/422522 and crbug.com/478932. 683 // track down the root causes of crbug.com/422522 and crbug.com/478932.
684 if (channel == version_info::Channel::UNKNOWN || 684 if (channel == version_info::Channel::UNKNOWN ||
685 channel == version_info::Channel::CANARY || 685 channel == version_info::Channel::CANARY ||
686 channel == version_info::Channel::DEV) { 686 channel == version_info::Channel::DEV) {
687 media::AudioManager::EnableHangMonitor(); 687 media::AudioManager::EnableHangMonitor();
688 } 688 }
689 689
690 // Enable profiler instrumentation depending on the channel. 690 // Enable profiler instrumentation depending on the channel.
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 #if defined(OS_WIN) 1008 #if defined(OS_WIN)
1009 if (!master_prefs_->welcome_page_on_os_upgrade_enabled) 1009 if (!master_prefs_->welcome_page_on_os_upgrade_enabled)
1010 local_state_->SetBoolean(prefs::kWelcomePageOnOSUpgradeEnabled, false); 1010 local_state_->SetBoolean(prefs::kWelcomePageOnOSUpgradeEnabled, false);
1011 #endif 1011 #endif
1012 } 1012 }
1013 #endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS) 1013 #endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
1014 1014
1015 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX) 1015 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX)
1016 // Set the product channel for crash reports. 1016 // Set the product channel for crash reports.
1017 base::debug::SetCrashKeyValue(crash_keys::kChannel, 1017 base::debug::SetCrashKeyValue(crash_keys::kChannel,
1018 chrome::VersionInfo::GetVersionStringModifier()); 1018 chrome::GetChannelString());
1019 #endif // defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX) 1019 #endif // defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX)
1020 1020
1021 // Initialize tracking synchronizer system. 1021 // Initialize tracking synchronizer system.
1022 tracking_synchronizer_ = new metrics::TrackingSynchronizer( 1022 tracking_synchronizer_ = new metrics::TrackingSynchronizer(
1023 make_scoped_ptr(new base::DefaultTickClock())); 1023 make_scoped_ptr(new base::DefaultTickClock()));
1024 1024
1025 #if defined(OS_MACOSX) 1025 #if defined(OS_MACOSX)
1026 // Get the Keychain API to register for distributed notifications on the main 1026 // Get the Keychain API to register for distributed notifications on the main
1027 // thread, which has a proper CFRunloop, instead of later on the I/O thread, 1027 // thread, which has a proper CFRunloop, instead of later on the I/O thread,
1028 // which doesn't. This ensures those notifications will get delivered 1028 // which doesn't. This ensures those notifications will get delivered
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 chromeos::CrosSettings::Shutdown(); 1800 chromeos::CrosSettings::Shutdown();
1801 #endif // defined(OS_CHROMEOS) 1801 #endif // defined(OS_CHROMEOS)
1802 #endif // defined(OS_ANDROID) 1802 #endif // defined(OS_ANDROID)
1803 } 1803 }
1804 1804
1805 // Public members: 1805 // Public members:
1806 1806
1807 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1807 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1808 chrome_extra_parts_.push_back(parts); 1808 chrome_extra_parts_.push_back(parts);
1809 } 1809 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698