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

Side by Side Diff: components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle.h

Issue 2645283007: Add the client for accessing Subresource Filter only list. (Closed)
Patch Set: fix HistoryNavTest Created 3 years, 9 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 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_SUBRESOURCE_FILTER_SAFE_BR OWSING_ACTIVATION_THROTTLE_H_
6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_SUBRESOURCE_FILTER_SAFE_BR OWSING_ACTIVATION_THROTTLE_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h"
13 #include "base/single_thread_task_runner.h"
14 #include "components/safe_browsing_db/database_manager.h"
15 #include "content/public/browser/navigation_throttle.h"
16 #include "url/gurl.h"
17
18 namespace subresource_filter {
19
20 // Client for accessing list with patterns to be used by the Subresource Filter.
21 class SubresourceFilterSafeBrowsingActivationThrottle
22 : public content::NavigationThrottle,
23 public base::SupportsWeakPtr<
24 SubresourceFilterSafeBrowsingActivationThrottle> {
25 public:
26 SubresourceFilterSafeBrowsingActivationThrottle(
27 content::NavigationHandle* handle,
28 const scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager>&
29 database_manager);
30
31 ~SubresourceFilterSafeBrowsingActivationThrottle() override;
32
33 // content::NavigaionThrottle:
engedy 2017/03/02 12:00:43 typo: Navigation
melandory 2017/03/06 15:00:01 Done.
34 content::NavigationThrottle::ThrottleCheckResult WillProcessResponse()
35 override;
36
37 void OnCheckUrlResultOnUI(const GURL& url,
38 safe_browsing::SBThreatType threat_type,
39 safe_browsing::ThreatPatternType pattern_type);
40
41 private:
42 class ActivationClient;
43
44 std::unique_ptr<ActivationClient> activation_client_;
45 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
46
47 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterSafeBrowsingActivationThrottle);
48 };
49
50 } // namespace subresource_filter
51
52 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_SUBRESOURCE_FILTER_SAFE _BROWSING_ACTIVATION_THROTTLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698