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

Side by Side Diff: chrome/browser/subresource_filter/subresource_filter_navigation_trottle_util.cc

Issue 2645283007: Add the client for accessing Subresource Filter only list. (Closed)
Patch Set: fix unittest Created 3 years, 10 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
(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/subresource_filter_navigation_trottl e_util.h"
6
7 #include "base/memory/ptr_util.h"
8 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
9 #include "components/safe_browsing_db/v4_feature_list.h"
10 #include "components/subresource_filter/content/browser/subresource_filter_activ ation_navigation_throttle.h"
11 #include "content/public/browser/navigation_handle.h"
12
13 std::unique_ptr<content::NavigationThrottle>
14 MaybeCreateSubresourceFilterNavigationThrottle(
15 content::NavigationHandle* handle,
16 safe_browsing::SafeBrowsingService* sb_service) {
17 if (handle->IsInMainFrame() &&
18 sb_service->database_manager()->IsSupported() &&
19 (safe_browsing::V4FeatureList::IsV4HybridEnabled() ||
vakh (use Gerrit instead) 2017/02/10 03:00:12 these methods are going away soon so don't be surp
melandory 2017/02/14 17:40:34 Rebased on top of it.
20 safe_browsing::V4FeatureList::IsV4OnlyEnabled())) {
21 return base::WrapUnique(
22 new subresource_filter::SubresourceFilterActivationNavigationThrottle(
23 handle, sb_service->v4_local_database_manager()));
24 }
25 return nullptr;
26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698