Chromium Code Reviews| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 52 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| 53 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" | 53 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" |
| 54 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 54 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
| 55 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 55 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| 56 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" | 56 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" |
| 57 #include "chrome/browser/notifications/platform_notification_service_impl.h" | 57 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
| 58 #include "chrome/browser/page_load_metrics/metrics_navigation_throttle.h" | 58 #include "chrome/browser/page_load_metrics/metrics_navigation_throttle.h" |
| 59 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 59 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 60 #include "chrome/browser/permissions/permission_context_base.h" | 60 #include "chrome/browser/permissions/permission_context_base.h" |
| 61 #include "chrome/browser/platform_util.h" | 61 #include "chrome/browser/platform_util.h" |
| 62 #include "chrome/browser/plugins/flash_download_interception.h" | |
|
tommycli
2016/08/24 19:11:30
These new includes should also be in the ENABLE_PL
trizzofo
2016/08/24 22:45:13
Done.
| |
| 62 #include "chrome/browser/prerender/prerender_final_status.h" | 63 #include "chrome/browser/prerender/prerender_final_status.h" |
| 63 #include "chrome/browser/prerender/prerender_manager.h" | 64 #include "chrome/browser/prerender/prerender_manager.h" |
| 64 #include "chrome/browser/prerender/prerender_manager_factory.h" | 65 #include "chrome/browser/prerender/prerender_manager_factory.h" |
| 65 #include "chrome/browser/prerender/prerender_message_filter.h" | 66 #include "chrome/browser/prerender/prerender_message_filter.h" |
| 66 #include "chrome/browser/printing/printing_message_filter.h" | 67 #include "chrome/browser/printing/printing_message_filter.h" |
| 67 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" | 68 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" |
| 68 #include "chrome/browser/profiles/profile.h" | 69 #include "chrome/browser/profiles/profile.h" |
| 69 #include "chrome/browser/profiles/profile_io_data.h" | 70 #include "chrome/browser/profiles/profile_io_data.h" |
| 70 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" | 71 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" |
| 71 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory .h" | 72 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory .h" |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 91 #include "chrome/browser/ui/browser_navigator.h" | 92 #include "chrome/browser/ui/browser_navigator.h" |
| 92 #include "chrome/browser/ui/browser_navigator_params.h" | 93 #include "chrome/browser/ui/browser_navigator_params.h" |
| 93 #include "chrome/browser/ui/chrome_select_file_policy.h" | 94 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 94 #include "chrome/browser/ui/sync/sync_promo_ui.h" | 95 #include "chrome/browser/ui/sync/sync_promo_ui.h" |
| 95 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" | 96 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" |
| 96 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" | 97 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" |
| 97 #include "chrome/browser/ui/webui/log_web_ui_url.h" | 98 #include "chrome/browser/ui/webui/log_web_ui_url.h" |
| 98 #include "chrome/browser/usb/usb_tab_helper.h" | 99 #include "chrome/browser/usb/usb_tab_helper.h" |
| 99 #include "chrome/common/channel_info.h" | 100 #include "chrome/common/channel_info.h" |
| 100 #include "chrome/common/chrome_constants.h" | 101 #include "chrome/common/chrome_constants.h" |
| 102 #include "chrome/common/chrome_features.h" | |
| 101 #include "chrome/common/chrome_paths.h" | 103 #include "chrome/common/chrome_paths.h" |
| 102 #include "chrome/common/chrome_switches.h" | 104 #include "chrome/common/chrome_switches.h" |
| 103 #include "chrome/common/env_vars.h" | 105 #include "chrome/common/env_vars.h" |
| 104 #include "chrome/common/features.h" | 106 #include "chrome/common/features.h" |
| 105 #include "chrome/common/logging_chrome.h" | 107 #include "chrome/common/logging_chrome.h" |
| 106 #include "chrome/common/pepper_permission_util.h" | 108 #include "chrome/common/pepper_permission_util.h" |
| 107 #include "chrome/common/pref_names.h" | 109 #include "chrome/common/pref_names.h" |
| 108 #include "chrome/common/render_messages.h" | 110 #include "chrome/common/render_messages.h" |
| 109 #include "chrome/common/secure_origin_whitelist.h" | 111 #include "chrome/common/secure_origin_whitelist.h" |
| 110 #include "chrome/common/url_constants.h" | 112 #include "chrome/common/url_constants.h" |
| (...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3007 if (url.is_valid()) { | 3009 if (url.is_valid()) { |
| 3008 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), | 3010 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), |
| 3009 metric, url); | 3011 metric, url); |
| 3010 } | 3012 } |
| 3011 } | 3013 } |
| 3012 | 3014 |
| 3013 ScopedVector<content::NavigationThrottle> | 3015 ScopedVector<content::NavigationThrottle> |
| 3014 ChromeContentBrowserClient::CreateThrottlesForNavigation( | 3016 ChromeContentBrowserClient::CreateThrottlesForNavigation( |
| 3015 content::NavigationHandle* handle) { | 3017 content::NavigationHandle* handle) { |
| 3016 ScopedVector<content::NavigationThrottle> throttles; | 3018 ScopedVector<content::NavigationThrottle> throttles; |
| 3019 | |
| 3020 if (base::FeatureList::IsEnabled(features::kPreferHtmlOverPlugins)) { | |
|
tommycli
2016/08/24 19:11:30
This should only happen if it's a main frame navig
trizzofo
2016/08/24 22:45:13
Done.
| |
| 3021 std::unique_ptr<content::NavigationThrottle> flash_url_throttle = | |
| 3022 FlashDownloadInterception::MaybeCreateThrottleFor(handle); | |
| 3023 if (flash_url_throttle) | |
| 3024 throttles.push_back(std::move(flash_url_throttle)); | |
| 3025 } | |
| 3026 | |
| 3017 if (handle->IsInMainFrame()) { | 3027 if (handle->IsInMainFrame()) { |
| 3018 throttles.push_back( | 3028 throttles.push_back( |
| 3019 page_load_metrics::MetricsNavigationThrottle::Create(handle)); | 3029 page_load_metrics::MetricsNavigationThrottle::Create(handle)); |
| 3020 } | 3030 } |
| 3021 | 3031 |
| 3022 #if defined(OS_ANDROID) | 3032 #if defined(OS_ANDROID) |
| 3023 // TODO(davidben): This is insufficient to integrate with prerender properly. | 3033 // TODO(davidben): This is insufficient to integrate with prerender properly. |
| 3024 // https://crbug.com/370595 | 3034 // https://crbug.com/370595 |
| 3025 prerender::PrerenderContents* prerender_contents = | 3035 prerender::PrerenderContents* prerender_contents = |
| 3026 prerender::PrerenderContents::FromWebContents(handle->GetWebContents()); | 3036 prerender::PrerenderContents::FromWebContents(handle->GetWebContents()); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3160 if (channel <= kMaxDisableEncryptionChannel) { | 3170 if (channel <= kMaxDisableEncryptionChannel) { |
| 3161 static const char* const kWebRtcDevSwitchNames[] = { | 3171 static const char* const kWebRtcDevSwitchNames[] = { |
| 3162 switches::kDisableWebRtcEncryption, | 3172 switches::kDisableWebRtcEncryption, |
| 3163 }; | 3173 }; |
| 3164 to_command_line->CopySwitchesFrom(from_command_line, | 3174 to_command_line->CopySwitchesFrom(from_command_line, |
| 3165 kWebRtcDevSwitchNames, | 3175 kWebRtcDevSwitchNames, |
| 3166 arraysize(kWebRtcDevSwitchNames)); | 3176 arraysize(kWebRtcDevSwitchNames)); |
| 3167 } | 3177 } |
| 3168 } | 3178 } |
| 3169 #endif // defined(ENABLE_WEBRTC) | 3179 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |