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 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 #include "device/geolocation/geolocation_provider.h" | 156 #include "device/geolocation/geolocation_provider.h" |
157 #include "extensions/features/features.h" | 157 #include "extensions/features/features.h" |
158 #include "media/base/media_resources.h" | 158 #include "media/base/media_resources.h" |
159 #include "media/media_features.h" | 159 #include "media/media_features.h" |
160 #include "net/base/net_module.h" | 160 #include "net/base/net_module.h" |
161 #include "net/cookies/cookie_monster.h" | 161 #include "net/cookies/cookie_monster.h" |
162 #include "net/http/http_network_layer.h" | 162 #include "net/http/http_network_layer.h" |
163 #include "net/http/http_stream_factory.h" | 163 #include "net/http/http_stream_factory.h" |
164 #include "net/url_request/url_request.h" | 164 #include "net/url_request/url_request.h" |
165 #include "printing/features/features.h" | 165 #include "printing/features/features.h" |
| 166 #include "rlz/features/features.h" |
166 #include "ui/base/l10n/l10n_util.h" | 167 #include "ui/base/l10n/l10n_util.h" |
167 #include "ui/base/layout.h" | 168 #include "ui/base/layout.h" |
168 #include "ui/base/material_design/material_design_controller.h" | 169 #include "ui/base/material_design/material_design_controller.h" |
169 #include "ui/base/resource/resource_bundle.h" | 170 #include "ui/base/resource/resource_bundle.h" |
170 | 171 |
171 #if defined(OS_ANDROID) | 172 #if defined(OS_ANDROID) |
172 #include "chrome/browser/android/offline_pages/offline_page_info_handler.h" | 173 #include "chrome/browser/android/offline_pages/offline_page_info_handler.h" |
173 #include "chrome/browser/metrics/thread_watcher_android.h" | 174 #include "chrome/browser/metrics/thread_watcher_android.h" |
174 #include "ui/base/resource/resource_bundle_android.h" | 175 #include "ui/base/resource/resource_bundle_android.h" |
175 #else | 176 #else |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 #include "chrome/browser/extensions/startup_helper.h" | 240 #include "chrome/browser/extensions/startup_helper.h" |
240 #include "extensions/browser/extension_protocols.h" | 241 #include "extensions/browser/extension_protocols.h" |
241 #include "extensions/common/features/feature_provider.h" | 242 #include "extensions/common/features/feature_provider.h" |
242 #include "extensions/components/javascript_dialog_extensions_client/javascript_d
ialog_extension_client_impl.h" | 243 #include "extensions/components/javascript_dialog_extensions_client/javascript_d
ialog_extension_client_impl.h" |
243 #endif // BUILDFLAG(ENABLE_EXTENSIONS) | 244 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
244 | 245 |
245 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) | 246 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) |
246 #include "printing/printed_document.h" | 247 #include "printing/printed_document.h" |
247 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) | 248 #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) && !defined(OFFICIAL_BUILD) |
248 | 249 |
249 #if defined(ENABLE_RLZ) | 250 #if BUILDFLAG(ENABLE_RLZ) |
250 #include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h" | 251 #include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h" |
251 #include "components/rlz/rlz_tracker.h" | 252 #include "components/rlz/rlz_tracker.h" |
252 #endif // defined(ENABLE_RLZ) | 253 #endif // BUILDFLAG(ENABLE_RLZ) |
253 | 254 |
254 #if BUILDFLAG(ENABLE_WEBRTC) | 255 #if BUILDFLAG(ENABLE_WEBRTC) |
255 #include "chrome/browser/media/webrtc/webrtc_log_util.h" | 256 #include "chrome/browser/media/webrtc/webrtc_log_util.h" |
256 #endif // BUILDFLAG(ENABLE_WEBRTC) | 257 #endif // BUILDFLAG(ENABLE_WEBRTC) |
257 | 258 |
258 #if defined(USE_AURA) | 259 #if defined(USE_AURA) |
259 #include "ui/aura/env.h" | 260 #include "ui/aura/env.h" |
260 #endif // defined(USE_AURA) | 261 #endif // defined(USE_AURA) |
261 | 262 |
262 #if !defined(OS_ANDROID) | 263 #if !defined(OS_ANDROID) |
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1701 | 1702 |
1702 // Verify that the profile is not on a network share and if so prepare to show | 1703 // Verify that the profile is not on a network share and if so prepare to show |
1703 // notification to the user. | 1704 // notification to the user. |
1704 if (NetworkProfileBubble::ShouldCheckNetworkProfile(profile_)) { | 1705 if (NetworkProfileBubble::ShouldCheckNetworkProfile(profile_)) { |
1705 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 1706 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
1706 base::Bind(&NetworkProfileBubble::CheckNetworkProfile, | 1707 base::Bind(&NetworkProfileBubble::CheckNetworkProfile, |
1707 profile_->GetPath())); | 1708 profile_->GetPath())); |
1708 } | 1709 } |
1709 #endif // defined(OS_WIN) | 1710 #endif // defined(OS_WIN) |
1710 | 1711 |
1711 #if defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) | 1712 #if BUILDFLAG(ENABLE_RLZ) && !defined(OS_CHROMEOS) |
1712 // Init the RLZ library. This just binds the dll and schedules a task on the | 1713 // Init the RLZ library. This just binds the dll and schedules a task on the |
1713 // file thread to be run sometime later. If this is the first run we record | 1714 // file thread to be run sometime later. If this is the first run we record |
1714 // the installation event. | 1715 // the installation event. |
1715 PrefService* pref_service = profile_->GetPrefs(); | 1716 PrefService* pref_service = profile_->GetPrefs(); |
1716 int ping_delay = first_run::IsChromeFirstRun() ? master_prefs_->ping_delay : | 1717 int ping_delay = first_run::IsChromeFirstRun() ? master_prefs_->ping_delay : |
1717 pref_service->GetInteger(first_run::GetPingDelayPrefName().c_str()); | 1718 pref_service->GetInteger(first_run::GetPingDelayPrefName().c_str()); |
1718 // Negative ping delay means to send ping immediately after a first search is | 1719 // Negative ping delay means to send ping immediately after a first search is |
1719 // recorded. | 1720 // recorded. |
1720 rlz::RLZTracker::SetRlzDelegate( | 1721 rlz::RLZTracker::SetRlzDelegate( |
1721 base::WrapUnique(new ChromeRLZTrackerDelegate)); | 1722 base::WrapUnique(new ChromeRLZTrackerDelegate)); |
1722 rlz::RLZTracker::InitRlzDelayed( | 1723 rlz::RLZTracker::InitRlzDelayed( |
1723 first_run::IsChromeFirstRun(), ping_delay < 0, | 1724 first_run::IsChromeFirstRun(), ping_delay < 0, |
1724 base::TimeDelta::FromMilliseconds(abs(ping_delay)), | 1725 base::TimeDelta::FromMilliseconds(abs(ping_delay)), |
1725 ChromeRLZTrackerDelegate::IsGoogleDefaultSearch(profile_), | 1726 ChromeRLZTrackerDelegate::IsGoogleDefaultSearch(profile_), |
1726 ChromeRLZTrackerDelegate::IsGoogleHomepage(profile_), | 1727 ChromeRLZTrackerDelegate::IsGoogleHomepage(profile_), |
1727 ChromeRLZTrackerDelegate::IsGoogleInStartpages(profile_)); | 1728 ChromeRLZTrackerDelegate::IsGoogleInStartpages(profile_)); |
1728 #endif // defined(ENABLE_RLZ) && !defined(OS_CHROMEOS) | 1729 #endif // BUILDFLAG(ENABLE_RLZ) && !defined(OS_CHROMEOS) |
1729 | 1730 |
1730 // Configure modules that need access to resources. | 1731 // Configure modules that need access to resources. |
1731 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 1732 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
1732 media::SetLocalizedStringProvider( | 1733 media::SetLocalizedStringProvider( |
1733 chrome_common_media::LocalizedStringProvider); | 1734 chrome_common_media::LocalizedStringProvider); |
1734 | 1735 |
1735 // In unittest mode, this will do nothing. In normal mode, this will create | 1736 // In unittest mode, this will do nothing. In normal mode, this will create |
1736 // the global IntranetRedirectDetector instance, which will promptly go to | 1737 // the global IntranetRedirectDetector instance, which will promptly go to |
1737 // sleep for seven seconds (to avoid slowing startup), and wake up afterwards | 1738 // sleep for seven seconds (to avoid slowing startup), and wake up afterwards |
1738 // to see if it should do anything else. | 1739 // to see if it should do anything else. |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2078 chromeos::CrosSettings::Shutdown(); | 2079 chromeos::CrosSettings::Shutdown(); |
2079 #endif // defined(OS_CHROMEOS) | 2080 #endif // defined(OS_CHROMEOS) |
2080 #endif // defined(OS_ANDROID) | 2081 #endif // defined(OS_ANDROID) |
2081 } | 2082 } |
2082 | 2083 |
2083 // Public members: | 2084 // Public members: |
2084 | 2085 |
2085 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2086 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
2086 chrome_extra_parts_.push_back(parts); | 2087 chrome_extra_parts_.push_back(parts); |
2087 } | 2088 } |
OLD | NEW |