Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2060313002: Navigation throttle for the Safe Browsing Subresource Filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pre-tab-activation
Patch Set: Navigation throttle for the Safe Browsing Subresource Filter. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 #include "components/google/core/browser/google_util.h" 124 #include "components/google/core/browser/google_util.h"
125 #include "components/metrics/client_info.h" 125 #include "components/metrics/client_info.h"
126 #include "components/net_log/chrome_net_log.h" 126 #include "components/net_log/chrome_net_log.h"
127 #include "components/pref_registry/pref_registry_syncable.h" 127 #include "components/pref_registry/pref_registry_syncable.h"
128 #include "components/prefs/pref_service.h" 128 #include "components/prefs/pref_service.h"
129 #include "components/prefs/scoped_user_pref_update.h" 129 #include "components/prefs/scoped_user_pref_update.h"
130 #include "components/rappor/rappor_utils.h" 130 #include "components/rappor/rappor_utils.h"
131 #include "components/security_interstitials/core/ssl_error_ui.h" 131 #include "components/security_interstitials/core/ssl_error_ui.h"
132 #include "components/signin/core/common/profile_management_switches.h" 132 #include "components/signin/core/common/profile_management_switches.h"
133 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" 133 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h"
134 #include "components/subresource_filter/content/browser/subresource_filter_navig ation_throttle.h"
134 #include "components/translate/core/common/translate_switches.h" 135 #include "components/translate/core/common/translate_switches.h"
135 #include "components/url_formatter/url_fixer.h" 136 #include "components/url_formatter/url_fixer.h"
136 #include "components/variations/variations_associated_data.h" 137 #include "components/variations/variations_associated_data.h"
137 #include "components/version_info/version_info.h" 138 #include "components/version_info/version_info.h"
138 #include "content/public/browser/browser_child_process_host.h" 139 #include "content/public/browser/browser_child_process_host.h"
139 #include "content/public/browser/browser_main_parts.h" 140 #include "content/public/browser/browser_main_parts.h"
140 #include "content/public/browser/browser_ppapi_host.h" 141 #include "content/public/browser/browser_ppapi_host.h"
141 #include "content/public/browser/browser_thread.h" 142 #include "content/public/browser/browser_thread.h"
142 #include "content/public/browser/browser_url_handler.h" 143 #include "content/public/browser/browser_url_handler.h"
143 #include "content/public/browser/child_process_data.h" 144 #include "content/public/browser/child_process_data.h"
(...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after
2874 throttles.push_back(MergeSessionNavigationThrottle::Create(handle)); 2875 throttles.push_back(MergeSessionNavigationThrottle::Create(handle));
2875 } 2876 }
2876 } 2877 }
2877 #endif 2878 #endif
2878 2879
2879 #if defined(ENABLE_EXTENSIONS) 2880 #if defined(ENABLE_EXTENSIONS)
2880 if (!handle->IsInMainFrame()) 2881 if (!handle->IsInMainFrame())
2881 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle)); 2882 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle));
2882 #endif 2883 #endif
2883 2884
2885 if (handle->IsInMainFrame() && handle->GetURL().SchemeIsHTTPOrHTTPS()) {
2886 throttles.push_back(
2887 subresource_filter::SubresourceFilterNavigationThrottle::Create(
2888 handle));
2889 }
2890
2884 return throttles; 2891 return throttles;
2885 } 2892 }
2886 2893
2887 content::DevToolsManagerDelegate* 2894 content::DevToolsManagerDelegate*
2888 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { 2895 ChromeContentBrowserClient::GetDevToolsManagerDelegate() {
2889 return new ChromeDevToolsManagerDelegate(); 2896 return new ChromeDevToolsManagerDelegate();
2890 } 2897 }
2891 2898
2892 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() { 2899 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() {
2893 return new ChromeTracingDelegate(); 2900 return new ChromeTracingDelegate();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
2962 if (channel <= kMaxDisableEncryptionChannel) { 2969 if (channel <= kMaxDisableEncryptionChannel) {
2963 static const char* const kWebRtcDevSwitchNames[] = { 2970 static const char* const kWebRtcDevSwitchNames[] = {
2964 switches::kDisableWebRtcEncryption, 2971 switches::kDisableWebRtcEncryption,
2965 }; 2972 };
2966 to_command_line->CopySwitchesFrom(from_command_line, 2973 to_command_line->CopySwitchesFrom(from_command_line,
2967 kWebRtcDevSwitchNames, 2974 kWebRtcDevSwitchNames,
2968 arraysize(kWebRtcDevSwitchNames)); 2975 arraysize(kWebRtcDevSwitchNames));
2969 } 2976 }
2970 } 2977 }
2971 #endif // defined(ENABLE_WEBRTC) 2978 #endif // defined(ENABLE_WEBRTC)
OLDNEW
« no previous file with comments | « no previous file | components/subresource_filter/content/browser/BUILD.gn » ('j') | content/public/browser/navigation_handle.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698