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

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

Issue 2889193003: [subresource_filter] Reland: Remove Forwarding NavigationThrottles (Closed)
Patch Set: Fix Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FILTER _THROTTLE_MANAGER_H_ 5 #ifndef COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FILTER _THROTTLE_MANAGER_H_
6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FILTER _THROTTLE_MANAGER_H_ 6 #define COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FILTER _THROTTLE_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <vector> 10 #include <vector>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 class ContentSubresourceFilterThrottleManager 45 class ContentSubresourceFilterThrottleManager
46 : public content::WebContentsObserver { 46 : public content::WebContentsObserver {
47 public: 47 public:
48 // It is expected that the Delegate outlives |this|, and manages the lifetime 48 // It is expected that the Delegate outlives |this|, and manages the lifetime
49 // of this class. 49 // of this class.
50 class Delegate { 50 class Delegate {
51 public: 51 public:
52 // The embedder may be interested in displaying UI to the user when the 52 // The embedder may be interested in displaying UI to the user when the
53 // first load is disallowed for a given page load. 53 // first load is disallowed for a given page load.
54 virtual void OnFirstSubresourceLoadDisallowed() {} 54 virtual void OnFirstSubresourceLoadDisallowed() {}
55
56 // Temporary method to help the delegate compute the activation decision.
57 virtual void WillProcessResponse(
58 content::NavigationHandle* navigation_handle) {}
59 }; 55 };
60 56
61 ContentSubresourceFilterThrottleManager( 57 ContentSubresourceFilterThrottleManager(
62 Delegate* delegate, 58 Delegate* delegate,
63 VerifiedRulesetDealer::Handle* dealer_handle, 59 VerifiedRulesetDealer::Handle* dealer_handle,
64 content::WebContents* web_contents); 60 content::WebContents* web_contents);
65 ~ContentSubresourceFilterThrottleManager() override; 61 ~ContentSubresourceFilterThrottleManager() override;
66 62
67 // Sets the desired page-level |activation_state| for the currently ongoing 63 // Sets the desired page-level |activation_state| for the currently ongoing
68 // page load, identified by its main-frame |navigation_handle|. To be called 64 // page load, identified by its main-frame |navigation_handle|. To be called
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 157
162 base::WeakPtrFactory<ContentSubresourceFilterThrottleManager> 158 base::WeakPtrFactory<ContentSubresourceFilterThrottleManager>
163 weak_ptr_factory_; 159 weak_ptr_factory_;
164 160
165 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterThrottleManager); 161 DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterThrottleManager);
166 }; 162 };
167 163
168 } // namespace subresource_filter 164 } // namespace subresource_filter
169 165
170 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL TER_THROTTLE_MANAGER_H_ 166 #endif // COMPONENTS_SUBRESOURCE_FILTER_CONTENT_BROWSER_CONTENT_SUBRESOURCE_FIL TER_THROTTLE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698