| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 #include "content/public/browser/notification_observer.h" | 136 #include "content/public/browser/notification_observer.h" |
| 137 #include "content/public/browser/notification_registrar.h" | 137 #include "content/public/browser/notification_registrar.h" |
| 138 #include "content/public/browser/notification_service.h" | 138 #include "content/public/browser/notification_service.h" |
| 139 #include "content/public/browser/notification_types.h" | 139 #include "content/public/browser/notification_types.h" |
| 140 #include "content/public/browser/power_usage_monitor.h" | 140 #include "content/public/browser/power_usage_monitor.h" |
| 141 #include "content/public/browser/site_instance.h" | 141 #include "content/public/browser/site_instance.h" |
| 142 #include "content/public/common/content_client.h" | 142 #include "content/public/common/content_client.h" |
| 143 #include "content/public/common/content_switches.h" | 143 #include "content/public/common/content_switches.h" |
| 144 #include "content/public/common/main_function_params.h" | 144 #include "content/public/common/main_function_params.h" |
| 145 #include "grit/platform_locale_settings.h" | 145 #include "grit/platform_locale_settings.h" |
| 146 #include "media/audio/audio_manager.h" | |
| 147 #include "net/base/net_module.h" | 146 #include "net/base/net_module.h" |
| 148 #include "net/cookies/cookie_monster.h" | 147 #include "net/cookies/cookie_monster.h" |
| 149 #include "net/http/http_network_layer.h" | 148 #include "net/http/http_network_layer.h" |
| 150 #include "net/http/http_stream_factory.h" | 149 #include "net/http/http_stream_factory.h" |
| 151 #include "net/url_request/url_request.h" | 150 #include "net/url_request/url_request.h" |
| 152 #include "ui/base/l10n/l10n_util.h" | 151 #include "ui/base/l10n/l10n_util.h" |
| 153 #include "ui/base/layout.h" | 152 #include "ui/base/layout.h" |
| 154 #include "ui/base/resource/resource_bundle.h" | 153 #include "ui/base/resource/resource_bundle.h" |
| 155 #include "ui/strings/grit/app_locale_settings.h" | 154 #include "ui/strings/grit/app_locale_settings.h" |
| 156 | 155 |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 // for posting tasks via base::Bind. Its deleted when it goes out of scope. | 735 // for posting tasks via base::Bind. Its deleted when it goes out of scope. |
| 737 // Even though base::Bind does AddRef and Release, the object will not be | 736 // Even though base::Bind does AddRef and Release, the object will not be |
| 738 // deleted after the Task is executed. | 737 // deleted after the Task is executed. |
| 739 field_trial_synchronizer_ = new FieldTrialSynchronizer(); | 738 field_trial_synchronizer_ = new FieldTrialSynchronizer(); |
| 740 | 739 |
| 741 // Now that field trials have been created, initializes metrics recording. | 740 // Now that field trials have been created, initializes metrics recording. |
| 742 metrics->InitializeMetricsRecordingState(); | 741 metrics->InitializeMetricsRecordingState(); |
| 743 | 742 |
| 744 const version_info::Channel channel = chrome::GetChannel(); | 743 const version_info::Channel channel = chrome::GetChannel(); |
| 745 | 744 |
| 746 // TODO(dalecurtis): Remove these checks and enable for all channels once we | |
| 747 // track down the root causes of crbug.com/422522 and crbug.com/478932. | |
| 748 if (channel == version_info::Channel::UNKNOWN || | |
| 749 channel == version_info::Channel::CANARY || | |
| 750 channel == version_info::Channel::DEV) { | |
| 751 media::AudioManager::EnableCrashKeyLoggingForAudioThreadHangs(); | |
| 752 } | |
| 753 | |
| 754 // Enable profiler instrumentation depending on the channel. | 745 // Enable profiler instrumentation depending on the channel. |
| 755 switch (channel) { | 746 switch (channel) { |
| 756 case version_info::Channel::UNKNOWN: | 747 case version_info::Channel::UNKNOWN: |
| 757 case version_info::Channel::CANARY: | 748 case version_info::Channel::CANARY: |
| 758 tracked_objects::ScopedTracker::Enable(); | 749 tracked_objects::ScopedTracker::Enable(); |
| 759 break; | 750 break; |
| 760 | 751 |
| 761 case version_info::Channel::DEV: | 752 case version_info::Channel::DEV: |
| 762 case version_info::Channel::BETA: | 753 case version_info::Channel::BETA: |
| 763 case version_info::Channel::STABLE: | 754 case version_info::Channel::STABLE: |
| (...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1889 chromeos::CrosSettings::Shutdown(); | 1880 chromeos::CrosSettings::Shutdown(); |
| 1890 #endif // defined(OS_CHROMEOS) | 1881 #endif // defined(OS_CHROMEOS) |
| 1891 #endif // defined(OS_ANDROID) | 1882 #endif // defined(OS_ANDROID) |
| 1892 } | 1883 } |
| 1893 | 1884 |
| 1894 // Public members: | 1885 // Public members: |
| 1895 | 1886 |
| 1896 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1887 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1897 chrome_extra_parts_.push_back(parts); | 1888 chrome_extra_parts_.push_back(parts); |
| 1898 } | 1889 } |
| OLD | NEW |