| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_ |
| 7 | 7 |
| 8 // A class that reports safebrowsing statistics to Google's SafeBrowsing | 8 // A class that reports safebrowsing statistics to Google's SafeBrowsing |
| 9 // servers. | 9 // servers. |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 void ReportInvalidCertificateChain(const std::string& serialized_report); | 61 void ReportInvalidCertificateChain(const std::string& serialized_report); |
| 62 | 62 |
| 63 void SetCertificateErrorReporterForTesting( | 63 void SetCertificateErrorReporterForTesting( |
| 64 std::unique_ptr<certificate_reporting::ErrorReporter> | 64 std::unique_ptr<certificate_reporting::ErrorReporter> |
| 65 certificate_error_reporter); | 65 certificate_error_reporter); |
| 66 | 66 |
| 67 // Report permission action to SafeBrowsing servers. | 67 // Report permission action to SafeBrowsing servers. |
| 68 void ReportPermissionAction(const GURL& origin, | 68 void ReportPermissionAction(const GURL& origin, |
| 69 content::PermissionType permission, | 69 content::PermissionType permission, |
| 70 PermissionAction action, | 70 PermissionAction action, |
| 71 PermissionSourceUI source_ui); | 71 PermissionSourceUI source_ui, |
| 72 bool user_gesture); |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, | 75 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, |
| 75 TestSafeBrowsingHitUrl); | 76 TestSafeBrowsingHitUrl); |
| 76 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, TestThreatDetailsUrl); | 77 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, TestThreatDetailsUrl); |
| 77 | 78 |
| 78 typedef std::set<const net::URLFetcher*> Reports; | 79 typedef std::set<const net::URLFetcher*> Reports; |
| 79 | 80 |
| 80 // Constructs a SafeBrowsingPingManager that issues network requests | 81 // Constructs a SafeBrowsingPingManager that issues network requests |
| 81 // using |request_context_getter|. | 82 // using |request_context_getter|. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 112 | 113 |
| 113 // Sends reports of permission actions. | 114 // Sends reports of permission actions. |
| 114 std::unique_ptr<PermissionReporter> permission_reporter_; | 115 std::unique_ptr<PermissionReporter> permission_reporter_; |
| 115 | 116 |
| 116 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingPingManager); | 117 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingPingManager); |
| 117 }; | 118 }; |
| 118 | 119 |
| 119 } // namespace safe_browsing | 120 } // namespace safe_browsing |
| 120 | 121 |
| 121 #endif // CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_ | 122 #endif // CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_ |
| OLD | NEW |