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_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 #include "components/content_settings/core/browser/host_content_settings_map.h" | 118 #include "components/content_settings/core/browser/host_content_settings_map.h" |
119 #include "components/content_settings/core/common/content_settings.h" | 119 #include "components/content_settings/core/common/content_settings.h" |
120 #include "components/content_settings/core/common/content_settings_types.h" | 120 #include "components/content_settings/core/common/content_settings_types.h" |
121 #include "components/data_reduction_proxy/content/browser/data_reduction_proxy_m
essage_filter.h" | 121 #include "components/data_reduction_proxy/content/browser/data_reduction_proxy_m
essage_filter.h" |
122 #include "components/dom_distiller/core/dom_distiller_switches.h" | 122 #include "components/dom_distiller/core/dom_distiller_switches.h" |
123 #include "components/dom_distiller/core/url_constants.h" | 123 #include "components/dom_distiller/core/url_constants.h" |
124 #include "components/error_page/common/error_page_switches.h" | 124 #include "components/error_page/common/error_page_switches.h" |
125 #include "components/google/core/browser/google_util.h" | 125 #include "components/google/core/browser/google_util.h" |
126 #include "components/metrics/client_info.h" | 126 #include "components/metrics/client_info.h" |
127 #include "components/net_log/chrome_net_log.h" | 127 #include "components/net_log/chrome_net_log.h" |
| 128 #include "components/page_load_metrics/browser/metrics_navigation_throttle.h" |
128 #include "components/pref_registry/pref_registry_syncable.h" | 129 #include "components/pref_registry/pref_registry_syncable.h" |
129 #include "components/prefs/pref_service.h" | 130 #include "components/prefs/pref_service.h" |
130 #include "components/prefs/scoped_user_pref_update.h" | 131 #include "components/prefs/scoped_user_pref_update.h" |
131 #include "components/rappor/rappor_utils.h" | 132 #include "components/rappor/rappor_utils.h" |
132 #include "components/security_interstitials/core/ssl_error_ui.h" | 133 #include "components/security_interstitials/core/ssl_error_ui.h" |
133 #include "components/signin/core/common/profile_management_switches.h" | 134 #include "components/signin/core/common/profile_management_switches.h" |
134 #include "components/spellcheck/common/spellcheck_switches.h" | 135 #include "components/spellcheck/common/spellcheck_switches.h" |
135 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" | 136 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" |
136 #include "components/subresource_filter/content/browser/subresource_filter_navig
ation_throttle.h" | 137 #include "components/subresource_filter/content/browser/subresource_filter_navig
ation_throttle.h" |
137 #include "components/translate/core/common/translate_switches.h" | 138 #include "components/translate/core/common/translate_switches.h" |
(...skipping 2760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2898 if (url.is_valid()) { | 2899 if (url.is_valid()) { |
2899 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), | 2900 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), |
2900 metric, url); | 2901 metric, url); |
2901 } | 2902 } |
2902 } | 2903 } |
2903 | 2904 |
2904 ScopedVector<content::NavigationThrottle> | 2905 ScopedVector<content::NavigationThrottle> |
2905 ChromeContentBrowserClient::CreateThrottlesForNavigation( | 2906 ChromeContentBrowserClient::CreateThrottlesForNavigation( |
2906 content::NavigationHandle* handle) { | 2907 content::NavigationHandle* handle) { |
2907 ScopedVector<content::NavigationThrottle> throttles; | 2908 ScopedVector<content::NavigationThrottle> throttles; |
| 2909 if (handle->IsInMainFrame()) { |
| 2910 throttles.push_back( |
| 2911 page_load_metrics::MetricsNavigationThrottle::Create(handle)); |
| 2912 } |
| 2913 |
2908 #if defined(OS_ANDROID) | 2914 #if defined(OS_ANDROID) |
2909 // TODO(davidben): This is insufficient to integrate with prerender properly. | 2915 // TODO(davidben): This is insufficient to integrate with prerender properly. |
2910 // https://crbug.com/370595 | 2916 // https://crbug.com/370595 |
2911 prerender::PrerenderContents* prerender_contents = | 2917 prerender::PrerenderContents* prerender_contents = |
2912 prerender::PrerenderContents::FromWebContents(handle->GetWebContents()); | 2918 prerender::PrerenderContents::FromWebContents(handle->GetWebContents()); |
2913 if (!prerender_contents && handle->IsInMainFrame()) { | 2919 if (!prerender_contents && handle->IsInMainFrame()) { |
2914 throttles.push_back( | 2920 throttles.push_back( |
2915 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor( | 2921 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor( |
2916 handle)); | 2922 handle)); |
2917 } | 2923 } |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3053 if (channel <= kMaxDisableEncryptionChannel) { | 3059 if (channel <= kMaxDisableEncryptionChannel) { |
3054 static const char* const kWebRtcDevSwitchNames[] = { | 3060 static const char* const kWebRtcDevSwitchNames[] = { |
3055 switches::kDisableWebRtcEncryption, | 3061 switches::kDisableWebRtcEncryption, |
3056 }; | 3062 }; |
3057 to_command_line->CopySwitchesFrom(from_command_line, | 3063 to_command_line->CopySwitchesFrom(from_command_line, |
3058 kWebRtcDevSwitchNames, | 3064 kWebRtcDevSwitchNames, |
3059 arraysize(kWebRtcDevSwitchNames)); | 3065 arraysize(kWebRtcDevSwitchNames)); |
3060 } | 3066 } |
3061 } | 3067 } |
3062 #endif // defined(ENABLE_WEBRTC) | 3068 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |