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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 #include "content/public/browser/notification_observer.h" | 127 #include "content/public/browser/notification_observer.h" |
128 #include "content/public/browser/notification_registrar.h" | 128 #include "content/public/browser/notification_registrar.h" |
129 #include "content/public/browser/notification_service.h" | 129 #include "content/public/browser/notification_service.h" |
130 #include "content/public/browser/notification_types.h" | 130 #include "content/public/browser/notification_types.h" |
131 #include "content/public/browser/power_usage_monitor.h" | 131 #include "content/public/browser/power_usage_monitor.h" |
132 #include "content/public/browser/site_instance.h" | 132 #include "content/public/browser/site_instance.h" |
133 #include "content/public/common/content_client.h" | 133 #include "content/public/common/content_client.h" |
134 #include "content/public/common/content_switches.h" | 134 #include "content/public/common/content_switches.h" |
135 #include "content/public/common/main_function_params.h" | 135 #include "content/public/common/main_function_params.h" |
136 #include "grit/platform_locale_settings.h" | 136 #include "grit/platform_locale_settings.h" |
| 137 #include "media/audio/audio_manager.h" |
137 #include "net/base/net_module.h" | 138 #include "net/base/net_module.h" |
138 #include "net/cookies/cookie_monster.h" | 139 #include "net/cookies/cookie_monster.h" |
139 #include "net/http/http_network_layer.h" | 140 #include "net/http/http_network_layer.h" |
140 #include "net/http/http_stream_factory.h" | 141 #include "net/http/http_stream_factory.h" |
141 #include "net/url_request/url_request.h" | 142 #include "net/url_request/url_request.h" |
142 #include "ui/base/l10n/l10n_util.h" | 143 #include "ui/base/l10n/l10n_util.h" |
143 #include "ui/base/layout.h" | 144 #include "ui/base/layout.h" |
144 #include "ui/base/resource/resource_bundle.h" | 145 #include "ui/base/resource/resource_bundle.h" |
145 #include "ui/strings/grit/app_locale_settings.h" | 146 #include "ui/strings/grit/app_locale_settings.h" |
146 | 147 |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 | 667 |
667 // Initialize FieldTrialSynchronizer system. This is a singleton and is used | 668 // Initialize FieldTrialSynchronizer system. This is a singleton and is used |
668 // for posting tasks via base::Bind. Its deleted when it goes out of scope. | 669 // for posting tasks via base::Bind. Its deleted when it goes out of scope. |
669 // Even though base::Bind does AddRef and Release, the object will not be | 670 // Even though base::Bind does AddRef and Release, the object will not be |
670 // deleted after the Task is executed. | 671 // deleted after the Task is executed. |
671 field_trial_synchronizer_ = new FieldTrialSynchronizer(); | 672 field_trial_synchronizer_ = new FieldTrialSynchronizer(); |
672 | 673 |
673 // Now that field trials have been created, initializes metrics recording. | 674 // Now that field trials have been created, initializes metrics recording. |
674 metrics->InitializeMetricsRecordingState(); | 675 metrics->InitializeMetricsRecordingState(); |
675 | 676 |
| 677 const chrome::VersionInfo::Channel channel = |
| 678 chrome::VersionInfo::GetChannel(); |
| 679 |
| 680 // TODO(dalecurtis): Remove these checks and enable for all channels once we |
| 681 // track down the root causes of crbug.com/422522 and crbug.com/478932. |
| 682 if (channel == chrome::VersionInfo::CHANNEL_UNKNOWN || |
| 683 chrome::VersionInfo::CHANNEL_CANARY || chrome::VersionInfo::CHANNEL_DEV) { |
| 684 media::AudioManager::EnableHangMonitor(); |
| 685 } |
| 686 |
676 // Enable profiler instrumentation depending on the channel. | 687 // Enable profiler instrumentation depending on the channel. |
677 switch (chrome::VersionInfo::GetChannel()) { | 688 switch (channel) { |
678 case chrome::VersionInfo::CHANNEL_UNKNOWN: | 689 case chrome::VersionInfo::CHANNEL_UNKNOWN: |
679 case chrome::VersionInfo::CHANNEL_CANARY: | 690 case chrome::VersionInfo::CHANNEL_CANARY: |
680 tracked_objects::ScopedTracker::Enable(); | 691 tracked_objects::ScopedTracker::Enable(); |
681 break; | 692 break; |
682 | 693 |
683 case chrome::VersionInfo::CHANNEL_DEV: | 694 case chrome::VersionInfo::CHANNEL_DEV: |
684 case chrome::VersionInfo::CHANNEL_BETA: | 695 case chrome::VersionInfo::CHANNEL_BETA: |
685 case chrome::VersionInfo::CHANNEL_STABLE: | 696 case chrome::VersionInfo::CHANNEL_STABLE: |
686 // Don't enable instrumentation. | 697 // Don't enable instrumentation. |
687 break; | 698 break; |
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1775 chromeos::CrosSettings::Shutdown(); | 1786 chromeos::CrosSettings::Shutdown(); |
1776 #endif // defined(OS_CHROMEOS) | 1787 #endif // defined(OS_CHROMEOS) |
1777 #endif // defined(OS_ANDROID) | 1788 #endif // defined(OS_ANDROID) |
1778 } | 1789 } |
1779 | 1790 |
1780 // Public members: | 1791 // Public members: |
1781 | 1792 |
1782 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1793 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1783 chrome_extra_parts_.push_back(parts); | 1794 chrome_extra_parts_.push_back(parts); |
1784 } | 1795 } |
OLD | NEW |