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/startup_metric_utils/browser/startup_metric_host_impl.h" | 135 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" |
135 #include "components/translate/core/common/translate_switches.h" | 136 #include "components/translate/core/common/translate_switches.h" |
136 #include "components/url_formatter/url_fixer.h" | 137 #include "components/url_formatter/url_fixer.h" |
137 #include "components/variations/variations_associated_data.h" | 138 #include "components/variations/variations_associated_data.h" |
(...skipping 2833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2971 } | 2972 } |
2972 } | 2973 } |
2973 } | 2974 } |
2974 #endif | 2975 #endif |
2975 | 2976 |
2976 #if defined(ENABLE_EXTENSIONS) | 2977 #if defined(ENABLE_EXTENSIONS) |
2977 if (!handle->IsInMainFrame()) | 2978 if (!handle->IsInMainFrame()) |
2978 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle)); | 2979 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle)); |
2979 #endif | 2980 #endif |
2980 | 2981 |
| 2982 if (handle->IsInMainFrame()) { |
| 2983 throttles.push_back( |
| 2984 page_load_metrics::MetricsNavigationThrottle::Create(handle)); |
| 2985 } |
| 2986 |
2981 return throttles; | 2987 return throttles; |
2982 } | 2988 } |
2983 | 2989 |
2984 content::DevToolsManagerDelegate* | 2990 content::DevToolsManagerDelegate* |
2985 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { | 2991 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { |
2986 return new ChromeDevToolsManagerDelegate(); | 2992 return new ChromeDevToolsManagerDelegate(); |
2987 } | 2993 } |
2988 | 2994 |
2989 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() { | 2995 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() { |
2990 return new ChromeTracingDelegate(); | 2996 return new ChromeTracingDelegate(); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3048 if (channel <= kMaxDisableEncryptionChannel) { | 3054 if (channel <= kMaxDisableEncryptionChannel) { |
3049 static const char* const kWebRtcDevSwitchNames[] = { | 3055 static const char* const kWebRtcDevSwitchNames[] = { |
3050 switches::kDisableWebRtcEncryption, | 3056 switches::kDisableWebRtcEncryption, |
3051 }; | 3057 }; |
3052 to_command_line->CopySwitchesFrom(from_command_line, | 3058 to_command_line->CopySwitchesFrom(from_command_line, |
3053 kWebRtcDevSwitchNames, | 3059 kWebRtcDevSwitchNames, |
3054 arraysize(kWebRtcDevSwitchNames)); | 3060 arraysize(kWebRtcDevSwitchNames)); |
3055 } | 3061 } |
3056 } | 3062 } |
3057 #endif // defined(ENABLE_WEBRTC) | 3063 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |