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

Side by Side Diff: content/browser/browsing_data/clear_site_data_throttle.h

Issue 2333733002: Add a fuzzer test for the Clear-Site-Data header. (Closed)
Patch Set: Addressed comments. Created 4 years, 3 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
« no previous file with comments | « no previous file | content/browser/browsing_data/clear_site_data_throttle_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 26 matching lines...) Expand all
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 45
46 private: 46 private:
47 friend class ClearSiteDataFuzzerTest;
47 friend class ClearSiteDataThrottleTest; 48 friend class ClearSiteDataThrottleTest;
48 FRIEND_TEST_ALL_PREFIXES(ClearSiteDataThrottleTest, ParseHeader); 49 FRIEND_TEST_ALL_PREFIXES(ClearSiteDataThrottleTest, ParseHeader);
49 FRIEND_TEST_ALL_PREFIXES(ClearSiteDataThrottleTest, InvalidHeader); 50 FRIEND_TEST_ALL_PREFIXES(ClearSiteDataThrottleTest, InvalidHeader);
50 51
51 explicit ClearSiteDataThrottle(NavigationHandle* navigation_handle); 52 explicit ClearSiteDataThrottle(NavigationHandle* navigation_handle);
52 53
53 // Scans for the first occurrence of the 'Clear-Site-Data' header, calls 54 // Scans for the first occurrence of the 'Clear-Site-Data' header, calls
54 // ParseHeader() to parse it, and requests the actual data clearing. This is 55 // ParseHeader() to parse it, and requests the actual data clearing. This is
55 // the common logic of WillRedirectRequest() and WillProcessResponse(). 56 // the common logic of WillRedirectRequest() and WillProcessResponse().
56 void HandleHeader(); 57 void HandleHeader();
(...skipping 25 matching lines...) Expand all
82 83
83 // Needed for asynchronous parsing and deletion tasks. 84 // Needed for asynchronous parsing and deletion tasks.
84 base::WeakPtrFactory<ClearSiteDataThrottle> weak_ptr_factory_; 85 base::WeakPtrFactory<ClearSiteDataThrottle> weak_ptr_factory_;
85 86
86 DISALLOW_COPY_AND_ASSIGN(ClearSiteDataThrottle); 87 DISALLOW_COPY_AND_ASSIGN(ClearSiteDataThrottle);
87 }; 88 };
88 89
89 } // namespace content 90 } // namespace content
90 91
91 #endif // CONTENT_BROWSER_BROWSING_DATA_CLEAR_SITE_DATA_THROTTLE_H_ 92 #endif // CONTENT_BROWSER_BROWSING_DATA_CLEAR_SITE_DATA_THROTTLE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/browsing_data/clear_site_data_throttle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698