OLD | NEW |
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 #include "components/subresource_filter/content/browser/subresource_filter_safe_
browsing_activation_throttle.h" | 5 #include "components/subresource_filter/content/browser/subresource_filter_safe_
browsing_activation_throttle.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <tuple> | 8 #include <tuple> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 }; | 72 }; |
73 | 73 |
74 class MockSubresourceFilterClient | 74 class MockSubresourceFilterClient |
75 : public subresource_filter::SubresourceFilterClient { | 75 : public subresource_filter::SubresourceFilterClient { |
76 public: | 76 public: |
77 MockSubresourceFilterClient() {} | 77 MockSubresourceFilterClient() {} |
78 | 78 |
79 ~MockSubresourceFilterClient() override = default; | 79 ~MockSubresourceFilterClient() override = default; |
80 | 80 |
81 MOCK_METHOD1(ToggleNotificationVisibility, void(bool)); | 81 MOCK_METHOD1(ToggleNotificationVisibility, void(bool)); |
82 MOCK_METHOD1(ShouldSuppressActivation, bool(content::NavigationHandle*)); | 82 MOCK_METHOD2(OnPageActivationComputed, |
| 83 bool(content::NavigationHandle*, bool)); |
83 MOCK_METHOD1(WhitelistByContentSettings, void(const GURL&)); | 84 MOCK_METHOD1(WhitelistByContentSettings, void(const GURL&)); |
84 MOCK_METHOD1(WhitelistInCurrentWebContents, void(const GURL&)); | 85 MOCK_METHOD1(WhitelistInCurrentWebContents, void(const GURL&)); |
85 MOCK_METHOD0(GetRulesetDealer, VerifiedRulesetDealer::Handle*()); | 86 MOCK_METHOD0(GetRulesetDealer, VerifiedRulesetDealer::Handle*()); |
86 | 87 |
87 private: | 88 private: |
88 DISALLOW_COPY_AND_ASSIGN(MockSubresourceFilterClient); | 89 DISALLOW_COPY_AND_ASSIGN(MockSubresourceFilterClient); |
89 }; | 90 }; |
90 | 91 |
91 // Throttle to call WillProcessResponse on the factory, which is otherwise | 92 // Throttle to call WillProcessResponse on the factory, which is otherwise |
92 // called by the ThrottleManager. | 93 // called by the ThrottleManager. |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 ::testing::Combine( | 488 ::testing::Combine( |
488 ::testing::Values( | 489 ::testing::Values( |
489 content::CancellingNavigationThrottle::WILL_START_REQUEST, | 490 content::CancellingNavigationThrottle::WILL_START_REQUEST, |
490 content::CancellingNavigationThrottle::WILL_REDIRECT_REQUEST, | 491 content::CancellingNavigationThrottle::WILL_REDIRECT_REQUEST, |
491 content::CancellingNavigationThrottle::WILL_PROCESS_RESPONSE), | 492 content::CancellingNavigationThrottle::WILL_PROCESS_RESPONSE), |
492 ::testing::Values( | 493 ::testing::Values( |
493 content::CancellingNavigationThrottle::SYNCHRONOUS, | 494 content::CancellingNavigationThrottle::SYNCHRONOUS, |
494 content::CancellingNavigationThrottle::ASYNCHRONOUS))); | 495 content::CancellingNavigationThrottle::ASYNCHRONOUS))); |
495 | 496 |
496 } // namespace subresource_filter | 497 } // namespace subresource_filter |
OLD | NEW |