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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 #include "chrome/browser/ui/uma_browsing_activity_observer.h" | 93 #include "chrome/browser/ui/uma_browsing_activity_observer.h" |
94 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 94 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
95 #include "chrome/common/channel_info.h" | 95 #include "chrome/common/channel_info.h" |
96 #include "chrome/common/chrome_constants.h" | 96 #include "chrome/common/chrome_constants.h" |
97 #include "chrome/common/chrome_paths.h" | 97 #include "chrome/common/chrome_paths.h" |
98 #include "chrome/common/chrome_result_codes.h" | 98 #include "chrome/common/chrome_result_codes.h" |
99 #include "chrome/common/chrome_switches.h" | 99 #include "chrome/common/chrome_switches.h" |
100 #include "chrome/common/crash_keys.h" | 100 #include "chrome/common/crash_keys.h" |
101 #include "chrome/common/env_vars.h" | 101 #include "chrome/common/env_vars.h" |
102 #include "chrome/common/logging_chrome.h" | 102 #include "chrome/common/logging_chrome.h" |
| 103 #include "chrome/common/media/media_resource_provider.h" |
103 #include "chrome/common/net/net_resource_provider.h" | 104 #include "chrome/common/net/net_resource_provider.h" |
104 #include "chrome/common/pref_names.h" | 105 #include "chrome/common/pref_names.h" |
105 #include "chrome/common/profiling.h" | 106 #include "chrome/common/profiling.h" |
106 #include "chrome/common/variations/variations_util.h" | 107 #include "chrome/common/variations/variations_util.h" |
107 #include "chrome/grit/generated_resources.h" | 108 #include "chrome/grit/generated_resources.h" |
108 #include "chrome/installer/util/google_update_settings.h" | 109 #include "chrome/installer/util/google_update_settings.h" |
109 #include "components/component_updater/component_updater_service.h" | 110 #include "components/component_updater/component_updater_service.h" |
110 #include "components/device_event_log/device_event_log.h" | 111 #include "components/device_event_log/device_event_log.h" |
111 #include "components/google/core/browser/google_util.h" | 112 #include "components/google/core/browser/google_util.h" |
112 #include "components/language_usage_metrics/language_usage_metrics.h" | 113 #include "components/language_usage_metrics/language_usage_metrics.h" |
(...skipping 19 matching lines...) Expand all Loading... |
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" |
140 #include "grit/platform_locale_settings.h" | 141 #include "grit/platform_locale_settings.h" |
141 #include "media/audio/audio_manager.h" | 142 #include "media/audio/audio_manager.h" |
| 143 #include "media/base/media_resources.h" |
142 #include "net/base/net_module.h" | 144 #include "net/base/net_module.h" |
143 #include "net/cookies/cookie_monster.h" | 145 #include "net/cookies/cookie_monster.h" |
144 #include "net/http/http_network_layer.h" | 146 #include "net/http/http_network_layer.h" |
145 #include "net/http/http_stream_factory.h" | 147 #include "net/http/http_stream_factory.h" |
146 #include "net/url_request/url_request.h" | 148 #include "net/url_request/url_request.h" |
147 #include "ui/base/l10n/l10n_util.h" | 149 #include "ui/base/l10n/l10n_util.h" |
148 #include "ui/base/layout.h" | 150 #include "ui/base/layout.h" |
149 #include "ui/base/resource/resource_bundle.h" | 151 #include "ui/base/resource/resource_bundle.h" |
150 #include "ui/strings/grit/app_locale_settings.h" | 152 #include "ui/strings/grit/app_locale_settings.h" |
151 | 153 |
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 rlz::RLZTracker::InitRlzDelayed( | 1520 rlz::RLZTracker::InitRlzDelayed( |
1519 first_run::IsChromeFirstRun(), ping_delay < 0, | 1521 first_run::IsChromeFirstRun(), ping_delay < 0, |
1520 base::TimeDelta::FromMilliseconds(abs(ping_delay)), | 1522 base::TimeDelta::FromMilliseconds(abs(ping_delay)), |
1521 ChromeRLZTrackerDelegate::IsGoogleDefaultSearch(profile_), | 1523 ChromeRLZTrackerDelegate::IsGoogleDefaultSearch(profile_), |
1522 ChromeRLZTrackerDelegate::IsGoogleHomepage(profile_), | 1524 ChromeRLZTrackerDelegate::IsGoogleHomepage(profile_), |
1523 ChromeRLZTrackerDelegate::IsGoogleInStartpages(profile_)); | 1525 ChromeRLZTrackerDelegate::IsGoogleInStartpages(profile_)); |
1524 #endif // defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) | 1526 #endif // defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) |
1525 | 1527 |
1526 // Configure modules that need access to resources. | 1528 // Configure modules that need access to resources. |
1527 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 1529 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
| 1530 media::SetLocalizedStringProvider( |
| 1531 chrome_common_media::LocalizedStringProvider); |
1528 | 1532 |
1529 // In unittest mode, this will do nothing. In normal mode, this will create | 1533 // In unittest mode, this will do nothing. In normal mode, this will create |
1530 // the global IntranetRedirectDetector instance, which will promptly go to | 1534 // the global IntranetRedirectDetector instance, which will promptly go to |
1531 // sleep for seven seconds (to avoid slowing startup), and wake up afterwards | 1535 // sleep for seven seconds (to avoid slowing startup), and wake up afterwards |
1532 // to see if it should do anything else. | 1536 // to see if it should do anything else. |
1533 // | 1537 // |
1534 // A simpler way of doing all this would be to have some function which could | 1538 // A simpler way of doing all this would be to have some function which could |
1535 // give the time elapsed since startup, and simply have this object check that | 1539 // give the time elapsed since startup, and simply have this object check that |
1536 // when asked to initialize itself, but this doesn't seem to exist. | 1540 // when asked to initialize itself, but this doesn't seem to exist. |
1537 // | 1541 // |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1837 chromeos::CrosSettings::Shutdown(); | 1841 chromeos::CrosSettings::Shutdown(); |
1838 #endif // defined(OS_CHROMEOS) | 1842 #endif // defined(OS_CHROMEOS) |
1839 #endif // defined(OS_ANDROID) | 1843 #endif // defined(OS_ANDROID) |
1840 } | 1844 } |
1841 | 1845 |
1842 // Public members: | 1846 // Public members: |
1843 | 1847 |
1844 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1848 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1845 chrome_extra_parts_.push_back(parts); | 1849 chrome_extra_parts_.push_back(parts); |
1846 } | 1850 } |
OLD | NEW |