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 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
125 #include "content/public/browser/notification_observer.h" | 125 #include "content/public/browser/notification_observer.h" |
126 #include "content/public/browser/notification_registrar.h" | 126 #include "content/public/browser/notification_registrar.h" |
127 #include "content/public/browser/notification_service.h" | 127 #include "content/public/browser/notification_service.h" |
128 #include "content/public/browser/notification_types.h" | 128 #include "content/public/browser/notification_types.h" |
129 #include "content/public/browser/power_usage_monitor.h" | 129 #include "content/public/browser/power_usage_monitor.h" |
130 #include "content/public/browser/site_instance.h" | 130 #include "content/public/browser/site_instance.h" |
131 #include "content/public/common/content_client.h" | 131 #include "content/public/common/content_client.h" |
132 #include "content/public/common/content_switches.h" | 132 #include "content/public/common/content_switches.h" |
133 #include "content/public/common/main_function_params.h" | 133 #include "content/public/common/main_function_params.h" |
134 #include "grit/platform_locale_settings.h" | 134 #include "grit/platform_locale_settings.h" |
135 #include "media/audio/audio_manager.h" | |
135 #include "net/base/net_module.h" | 136 #include "net/base/net_module.h" |
136 #include "net/cookies/cookie_monster.h" | 137 #include "net/cookies/cookie_monster.h" |
137 #include "net/http/http_network_layer.h" | 138 #include "net/http/http_network_layer.h" |
138 #include "net/http/http_stream_factory.h" | 139 #include "net/http/http_stream_factory.h" |
139 #include "net/url_request/url_request.h" | 140 #include "net/url_request/url_request.h" |
140 #include "ui/base/l10n/l10n_util.h" | 141 #include "ui/base/l10n/l10n_util.h" |
141 #include "ui/base/layout.h" | 142 #include "ui/base/layout.h" |
142 #include "ui/base/resource/resource_bundle.h" | 143 #include "ui/base/resource/resource_bundle.h" |
143 #include "ui/strings/grit/app_locale_settings.h" | 144 #include "ui/strings/grit/app_locale_settings.h" |
144 | 145 |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
659 | 660 |
660 // Initialize FieldTrialSynchronizer system. This is a singleton and is used | 661 // Initialize FieldTrialSynchronizer system. This is a singleton and is used |
661 // for posting tasks via base::Bind. Its deleted when it goes out of scope. | 662 // for posting tasks via base::Bind. Its deleted when it goes out of scope. |
662 // Even though base::Bind does AddRef and Release, the object will not be | 663 // Even though base::Bind does AddRef and Release, the object will not be |
663 // deleted after the Task is executed. | 664 // deleted after the Task is executed. |
664 field_trial_synchronizer_ = new FieldTrialSynchronizer(); | 665 field_trial_synchronizer_ = new FieldTrialSynchronizer(); |
665 | 666 |
666 // Now that field trials have been created, initializes metrics recording. | 667 // Now that field trials have been created, initializes metrics recording. |
667 metrics->InitializeMetricsRecordingState(); | 668 metrics->InitializeMetricsRecordingState(); |
668 | 669 |
670 const chrome::VersionInfo::Channel channel = | |
671 chrome::VersionInfo::GetChannel(); | |
672 | |
673 // TODO(dalecurtis): Remove these checks and enable for all channels once we | |
674 // track down the root causes of crbug.com/422522 and crbug.com/478932. | |
Nico
2015/04/28 17:53:38
do you want to do this only on windows then?
DaleCurtis
2015/04/28 18:27:09
Not yet, I'd like more confidence given the lower
DaleCurtis
2015/04/28 18:27:27
Err lower user counts on dev, not beta.
| |
675 if (channel == chrome::VersionInfo::CHANNEL_UNKNOWN || | |
676 chrome::VersionInfo::CHANNEL_CANARY || chrome::VersionInfo::CHANNEL_DEV) { | |
677 media::AudioManager::EnableHangMonitor(); | |
678 } | |
679 | |
669 // Enable profiler instrumentation depending on the channel. | 680 // Enable profiler instrumentation depending on the channel. |
670 switch (chrome::VersionInfo::GetChannel()) { | 681 switch (channel) { |
671 case chrome::VersionInfo::CHANNEL_UNKNOWN: | 682 case chrome::VersionInfo::CHANNEL_UNKNOWN: |
672 case chrome::VersionInfo::CHANNEL_CANARY: | 683 case chrome::VersionInfo::CHANNEL_CANARY: |
673 tracked_objects::ScopedTracker::Enable(); | 684 tracked_objects::ScopedTracker::Enable(); |
674 break; | 685 break; |
675 | 686 |
676 case chrome::VersionInfo::CHANNEL_DEV: | 687 case chrome::VersionInfo::CHANNEL_DEV: |
677 case chrome::VersionInfo::CHANNEL_BETA: | 688 case chrome::VersionInfo::CHANNEL_BETA: |
678 case chrome::VersionInfo::CHANNEL_STABLE: | 689 case chrome::VersionInfo::CHANNEL_STABLE: |
679 // Don't enable instrumentation. | 690 // Don't enable instrumentation. |
680 break; | 691 break; |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1755 chromeos::CrosSettings::Shutdown(); | 1766 chromeos::CrosSettings::Shutdown(); |
1756 #endif // defined(OS_CHROMEOS) | 1767 #endif // defined(OS_CHROMEOS) |
1757 #endif // defined(OS_ANDROID) | 1768 #endif // defined(OS_ANDROID) |
1758 } | 1769 } |
1759 | 1770 |
1760 // Public members: | 1771 // Public members: |
1761 | 1772 |
1762 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1773 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1763 chrome_extra_parts_.push_back(parts); | 1774 chrome_extra_parts_.push_back(parts); |
1764 } | 1775 } |
OLD | NEW |