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

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: adressing engedy@ comments Created 4 years, 5 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
« no previous file with comments | « no previous file | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16 matching lines...) Expand all
27 #include "base/threading/sequenced_worker_pool.h" 27 #include "base/threading/sequenced_worker_pool.h"
28 #include "base/threading/thread_task_runner_handle.h" 28 #include "base/threading/thread_task_runner_handle.h"
29 #include "build/build_config.h" 29 #include "build/build_config.h"
30 #include "chrome/browser/after_startup_task_utils.h" 30 #include "chrome/browser/after_startup_task_utils.h"
31 #include "chrome/browser/apps/app_url_redirector.h" 31 #include "chrome/browser/apps/app_url_redirector.h"
32 #include "chrome/browser/browser_about_handler.h" 32 #include "chrome/browser/browser_about_handler.h"
33 #include "chrome/browser/browser_process.h" 33 #include "chrome/browser/browser_process.h"
34 #include "chrome/browser/browser_shutdown.h" 34 #include "chrome/browser/browser_shutdown.h"
35 #include "chrome/browser/browsing_data/browsing_data_helper.h" 35 #include "chrome/browser/browsing_data/browsing_data_helper.h"
36 #include "chrome/browser/browsing_data/browsing_data_remover.h" 36 #include "chrome/browser/browsing_data/browsing_data_remover.h"
37 #include "components/subresource_filter/content/browser/content_subresource_filt er_driver_factory.h"
37 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h" 38 #include "chrome/browser/browsing_data/browsing_data_remover_factory.h"
38 #include "chrome/browser/character_encoding.h" 39 #include "chrome/browser/character_encoding.h"
39 #include "chrome/browser/chrome_content_browser_client_parts.h" 40 #include "chrome/browser/chrome_content_browser_client_parts.h"
40 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" 41 #include "chrome/browser/chrome_net_benchmarking_message_filter.h"
41 #include "chrome/browser/chrome_quota_permission_context.h" 42 #include "chrome/browser/chrome_quota_permission_context.h"
42 #include "chrome/browser/content_settings/cookie_settings_factory.h" 43 #include "chrome/browser/content_settings/cookie_settings_factory.h"
43 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 44 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
44 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 45 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
45 #include "chrome/browser/defaults.h" 46 #include "chrome/browser/defaults.h"
46 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" 47 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 #include "components/google/core/browser/google_util.h" 126 #include "components/google/core/browser/google_util.h"
126 #include "components/metrics/client_info.h" 127 #include "components/metrics/client_info.h"
127 #include "components/net_log/chrome_net_log.h" 128 #include "components/net_log/chrome_net_log.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"
136 #include "components/subresource_filter/content/browser/subresource_filter_navig ation_throttle.h"
135 #include "components/translate/core/common/translate_switches.h" 137 #include "components/translate/core/common/translate_switches.h"
136 #include "components/url_formatter/url_fixer.h" 138 #include "components/url_formatter/url_fixer.h"
137 #include "components/variations/variations_associated_data.h" 139 #include "components/variations/variations_associated_data.h"
138 #include "components/version_info/version_info.h" 140 #include "components/version_info/version_info.h"
139 #include "content/public/browser/browser_child_process_host.h" 141 #include "content/public/browser/browser_child_process_host.h"
140 #include "content/public/browser/browser_main_parts.h" 142 #include "content/public/browser/browser_main_parts.h"
141 #include "content/public/browser/browser_ppapi_host.h" 143 #include "content/public/browser/browser_ppapi_host.h"
142 #include "content/public/browser/browser_thread.h" 144 #include "content/public/browser/browser_thread.h"
143 #include "content/public/browser/browser_url_handler.h" 145 #include "content/public/browser/browser_url_handler.h"
144 #include "content/public/browser/child_process_data.h" 146 #include "content/public/browser/child_process_data.h"
(...skipping 2825 matching lines...) Expand 10 before | Expand all | Expand 10 after
2970 } 2972 }
2971 } 2973 }
2972 } 2974 }
2973 #endif 2975 #endif
2974 2976
2975 #if defined(ENABLE_EXTENSIONS) 2977 #if defined(ENABLE_EXTENSIONS)
2976 if (!handle->IsInMainFrame()) 2978 if (!handle->IsInMainFrame())
2977 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle)); 2979 throttles.push_back(new extensions::ExtensionNavigationThrottle(handle));
2978 #endif 2980 #endif
2979 2981
2982 subresource_filter::ContentSubresourceFilterDriverFactory*
2983 subresource_filter_driver_factory =
2984 subresource_filter::ContentSubresourceFilterDriverFactory::
2985 FromWebContents(handle->GetWebContents());
2986 if (subresource_filter_driver_factory && handle->IsInMainFrame() &&
2987 handle->GetURL().SchemeIsHTTPOrHTTPS()) {
2988 // TODO(melandory): Activation logic should be moved to the
2989 // WebContentsObserver, once ReadyToCommitNavigation is available on
2990 // pre-PlzNavigate world (tracking bug: https://crbug.com/621856).
2991 throttles.push_back(
2992 subresource_filter::SubresourceFilterNavigationThrottle::Create(
2993 handle));
2994 }
2995
2980 return throttles; 2996 return throttles;
2981 } 2997 }
2982 2998
2983 content::DevToolsManagerDelegate* 2999 content::DevToolsManagerDelegate*
2984 ChromeContentBrowserClient::GetDevToolsManagerDelegate() { 3000 ChromeContentBrowserClient::GetDevToolsManagerDelegate() {
2985 return new ChromeDevToolsManagerDelegate(); 3001 return new ChromeDevToolsManagerDelegate();
2986 } 3002 }
2987 3003
2988 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() { 3004 content::TracingDelegate* ChromeContentBrowserClient::GetTracingDelegate() {
2989 return new ChromeTracingDelegate(); 3005 return new ChromeTracingDelegate();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
3047 if (channel <= kMaxDisableEncryptionChannel) { 3063 if (channel <= kMaxDisableEncryptionChannel) {
3048 static const char* const kWebRtcDevSwitchNames[] = { 3064 static const char* const kWebRtcDevSwitchNames[] = {
3049 switches::kDisableWebRtcEncryption, 3065 switches::kDisableWebRtcEncryption,
3050 }; 3066 };
3051 to_command_line->CopySwitchesFrom(from_command_line, 3067 to_command_line->CopySwitchesFrom(from_command_line,
3052 kWebRtcDevSwitchNames, 3068 kWebRtcDevSwitchNames,
3053 arraysize(kWebRtcDevSwitchNames)); 3069 arraysize(kWebRtcDevSwitchNames));
3054 } 3070 }
3055 } 3071 }
3056 #endif // defined(ENABLE_WEBRTC) 3072 #endif // defined(ENABLE_WEBRTC)
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698