| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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/pref_registry/pref_registry_syncable.h" | 128 #include "components/pref_registry/pref_registry_syncable.h" |
| 129 #include "components/prefs/pref_service.h" | 129 #include "components/prefs/pref_service.h" |
| 130 #include "components/prefs/scoped_user_pref_update.h" | 130 #include "components/prefs/scoped_user_pref_update.h" |
| 131 #include "components/rappor/rappor_utils.h" | 131 #include "components/rappor/rappor_utils.h" |
| 132 #include "components/security_interstitials/core/ssl_error_ui.h" | 132 #include "components/security_interstitials/core/ssl_error_ui.h" |
| 133 #include "components/signin/core/common/profile_management_switches.h" | 133 #include "components/signin/core/common/profile_management_switches.h" |
| 134 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" | 134 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" |
| 135 #include "components/subresource_filter/content/browser/subresource_filter_navig
ation_throttle.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" |
| 138 #include "components/version_info/version_info.h" | 139 #include "components/version_info/version_info.h" |
| 139 #include "content/public/browser/browser_child_process_host.h" | 140 #include "content/public/browser/browser_child_process_host.h" |
| 140 #include "content/public/browser/browser_main_parts.h" | 141 #include "content/public/browser/browser_main_parts.h" |
| 141 #include "content/public/browser/browser_ppapi_host.h" | 142 #include "content/public/browser/browser_ppapi_host.h" |
| 142 #include "content/public/browser/browser_thread.h" | 143 #include "content/public/browser/browser_thread.h" |
| 143 #include "content/public/browser/browser_url_handler.h" | 144 #include "content/public/browser/browser_url_handler.h" |
| 144 #include "content/public/browser/child_process_data.h" | 145 #include "content/public/browser/child_process_data.h" |
| (...skipping 2787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2932 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); | 2933 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); |
| 2933 } | 2934 } |
| 2934 } | 2935 } |
| 2935 #endif | 2936 #endif |
| 2936 | 2937 |
| 2937 #if defined(ENABLE_EXTENSIONS) | 2938 #if defined(ENABLE_EXTENSIONS) |
| 2938 if (!handle->IsInMainFrame()) | 2939 if (!handle->IsInMainFrame()) |
| 2939 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle)); | 2940 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle)); |
| 2940 #endif | 2941 #endif |
| 2941 | 2942 |
| 2943 if (handle->IsInMainFrame() && handle->GetURL().SchemeIsHTTPOrHTTPS()) { |
| 2944 // TODO(melandory): Activation logic should be moved to the |
| 2945 // WebContentsObserver, once ReadyToCommitNavigation is available on |
| 2946 // pre-PlzNavigate world (tracking bug: https://crbug.com/621856). |
| 2947 throttles.push_back( |
| 2948 subresource_filter::SubresourceFilterNavigationThrottle::Create( |
| 2949 handle)); |
| 2950 } |
| 2951 |
| 2942 return throttles; | 2952 return throttles; |
| 2943 } | 2953 } |
| 2944 | 2954 |
| 2945 content::DevToolsManagerDelegate* | 2955 content::DevToolsManagerDelegate* |
| 2946 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { | 2956 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { |
| 2947 return new ChromeDevToolsManagerDelegate(); | 2957 return new ChromeDevToolsManagerDelegate(); |
| 2948 } | 2958 } |
| 2949 | 2959 |
| 2950 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() { | 2960 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() { |
| 2951 return new ChromeTracingDelegate(); | 2961 return new ChromeTracingDelegate(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3009 if (channel <= kMaxDisableEncryptionChannel) { | 3019 if (channel <= kMaxDisableEncryptionChannel) { |
| 3010 static const char* const kWebRtcDevSwitchNames[] = { | 3020 static const char* const kWebRtcDevSwitchNames[] = { |
| 3011 switches::kDisableWebRtcEncryption, | 3021 switches::kDisableWebRtcEncryption, |
| 3012 }; | 3022 }; |
| 3013 to_command_line->CopySwitchesFrom(from_command_line, | 3023 to_command_line->CopySwitchesFrom(from_command_line, |
| 3014 kWebRtcDevSwitchNames, | 3024 kWebRtcDevSwitchNames, |
| 3015 arraysize(kWebRtcDevSwitchNames)); | 3025 arraysize(kWebRtcDevSwitchNames)); |
| 3016 } | 3026 } |
| 3017 } | 3027 } |
| 3018 #endif // defined(ENABLE_WEBRTC) | 3028 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |