OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/subresource_filter/navigation_throttle_util.h" | |
6 | |
7 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | |
8 #include "components/safe_browsing_db/v4_feature_list.h" | |
9 #include "components/subresource_filter/content/browser/subresource_filter_safe_ browsing_activation_throttle.h" | |
10 #include "content/public/browser/navigation_handle.h" | |
11 | |
12 content::NavigationThrottle* MaybeCreateSubresourceFilterNavigationThrottle( | |
13 content::NavigationHandle* navigation_handle, | |
14 safe_browsing::SafeBrowsingService* safe_browsing_service) { | |
15 if (navigation_handle->IsInMainFrame() && safe_browsing_service && | |
16 safe_browsing_service->database_manager()->IsSupported() && | |
engedy
2017/03/21 13:44:16
nit: Let's #include "components/safe_browsing_db/d
melandory
2017/03/24 15:49:27
Done.
| |
17 safe_browsing::V4FeatureList::GetV4UsageStatus() == | |
18 safe_browsing::V4FeatureList::V4UsageStatus::V4_ONLY) { | |
19 return new subresource_filter:: | |
20 SubresourceFilterSafeBrowsingActivationThrottle( | |
21 navigation_handle, safe_browsing_service->database_manager()); | |
22 } | |
23 return nullptr; | |
24 } | |
OLD | NEW |