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 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 2748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2893 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); | 2894 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); |
| 2894 } | 2895 } |
| 2895 } | 2896 } |
| 2896 #endif | 2897 #endif |
| 2897 | 2898 |
| 2898 #if defined(ENABLE_EXTENSIONS) | 2899 #if defined(ENABLE_EXTENSIONS) |
| 2899 if (!handle->IsInMainFrame()) | 2900 if (!handle->IsInMainFrame()) |
| 2900 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle)); | 2901 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle)); |
| 2901 #endif | 2902 #endif |
| 2902 | 2903 |
| 2904 if (handle->IsInMainFrame() && handle->GetURL().SchemeIsHTTPOrHTTPS()) { | |
| 2905 // TODO(melandory): Activation logic should be moved to the | |
| 2906 // WebContentsObserver, once ReadyToCommitNavigation is available on | |
| 2907 // pre-PlzNavigate world (tracking bug: crbug.com/621856). | |
|
nasko
2016/06/28 22:12:36
nit: https://crbug...
melandory
2016/07/01 07:10:48
Done.
| |
| 2908 throttles.push_back( | |
| 2909 subresource_filter::SubresourceFilterNavigationThrottle::Create( | |
| 2910 handle)); | |
| 2911 } | |
| 2912 | |
| 2903 return throttles; | 2913 return throttles; |
| 2904 } | 2914 } |
| 2905 | 2915 |
| 2906 content::DevToolsManagerDelegate* | 2916 content::DevToolsManagerDelegate* |
| 2907 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { | 2917 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { |
| 2908 return new ChromeDevToolsManagerDelegate(); | 2918 return new ChromeDevToolsManagerDelegate(); |
| 2909 } | 2919 } |
| 2910 | 2920 |
| 2911 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() { | 2921 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() { |
| 2912 return new ChromeTracingDelegate(); | 2922 return new ChromeTracingDelegate(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2970 if (channel <= kMaxDisableEncryptionChannel) { | 2980 if (channel <= kMaxDisableEncryptionChannel) { |
| 2971 static const char* const kWebRtcDevSwitchNames[] = { | 2981 static const char* const kWebRtcDevSwitchNames[] = { |
| 2972 switches::kDisableWebRtcEncryption, | 2982 switches::kDisableWebRtcEncryption, |
| 2973 }; | 2983 }; |
| 2974 to_command_line->CopySwitchesFrom(from_command_line, | 2984 to_command_line->CopySwitchesFrom(from_command_line, |
| 2975 kWebRtcDevSwitchNames, | 2985 kWebRtcDevSwitchNames, |
| 2976 arraysize(kWebRtcDevSwitchNames)); | 2986 arraysize(kWebRtcDevSwitchNames)); |
| 2977 } | 2987 } |
| 2978 } | 2988 } |
| 2979 #endif // defined(ENABLE_WEBRTC) | 2989 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |