| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_BROWSER_BROWSING_DATA_CLEAR_SITE_DATA_THROTTLE_H_ | 5 #ifndef CONTENT_BROWSER_BROWSING_DATA_CLEAR_SITE_DATA_THROTTLE_H_ |
| 6 #define CONTENT_BROWSER_BROWSING_DATA_CLEAR_SITE_DATA_THROTTLE_H_ | 6 #define CONTENT_BROWSER_BROWSING_DATA_CLEAR_SITE_DATA_THROTTLE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 static std::unique_ptr<NavigationThrottle> CreateThrottleForNavigation( | 36 static std::unique_ptr<NavigationThrottle> CreateThrottleForNavigation( |
| 37 NavigationHandle* handle); | 37 NavigationHandle* handle); |
| 38 | 38 |
| 39 ~ClearSiteDataThrottle() override; | 39 ~ClearSiteDataThrottle() override; |
| 40 | 40 |
| 41 // NavigationThrottle implementation: | 41 // NavigationThrottle implementation: |
| 42 ThrottleCheckResult WillStartRequest() override; | 42 ThrottleCheckResult WillStartRequest() override; |
| 43 ThrottleCheckResult WillRedirectRequest() override; | 43 ThrottleCheckResult WillRedirectRequest() override; |
| 44 ThrottleCheckResult WillProcessResponse() override; | 44 ThrottleCheckResult WillProcessResponse() override; |
| 45 const char* GetNameForLogging() override; |
| 45 | 46 |
| 46 private: | 47 private: |
| 47 friend class ClearSiteDataFuzzerTest; | 48 friend class ClearSiteDataFuzzerTest; |
| 48 friend class ClearSiteDataThrottleTest; | 49 friend class ClearSiteDataThrottleTest; |
| 49 FRIEND_TEST_ALL_PREFIXES(ClearSiteDataThrottleTest, ParseHeader); | 50 FRIEND_TEST_ALL_PREFIXES(ClearSiteDataThrottleTest, ParseHeader); |
| 50 FRIEND_TEST_ALL_PREFIXES(ClearSiteDataThrottleTest, InvalidHeader); | 51 FRIEND_TEST_ALL_PREFIXES(ClearSiteDataThrottleTest, InvalidHeader); |
| 51 | 52 |
| 52 explicit ClearSiteDataThrottle(NavigationHandle* navigation_handle); | 53 explicit ClearSiteDataThrottle(NavigationHandle* navigation_handle); |
| 53 | 54 |
| 54 // Scans for the first occurrence of the 'Clear-Site-Data' header, calls | 55 // Scans for the first occurrence of the 'Clear-Site-Data' header, calls |
| (...skipping 28 matching lines...) Expand all Loading... |
| 83 | 84 |
| 84 // Needed for asynchronous parsing and deletion tasks. | 85 // Needed for asynchronous parsing and deletion tasks. |
| 85 base::WeakPtrFactory<ClearSiteDataThrottle> weak_ptr_factory_; | 86 base::WeakPtrFactory<ClearSiteDataThrottle> weak_ptr_factory_; |
| 86 | 87 |
| 87 DISALLOW_COPY_AND_ASSIGN(ClearSiteDataThrottle); | 88 DISALLOW_COPY_AND_ASSIGN(ClearSiteDataThrottle); |
| 88 }; | 89 }; |
| 89 | 90 |
| 90 } // namespace content | 91 } // namespace content |
| 91 | 92 |
| 92 #endif // CONTENT_BROWSER_BROWSING_DATA_CLEAR_SITE_DATA_THROTTLE_H_ | 93 #endif // CONTENT_BROWSER_BROWSING_DATA_CLEAR_SITE_DATA_THROTTLE_H_ |
| OLD | NEW |