| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 private: | 71 private: |
| 72 friend class PermissionReporterBrowserTest; | 72 friend class PermissionReporterBrowserTest; |
| 73 friend class SafeBrowsingPingManagerTest; | 73 friend class SafeBrowsingPingManagerTest; |
| 74 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, | 74 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, |
| 75 TestSafeBrowsingHitUrl); | 75 TestSafeBrowsingHitUrl); |
| 76 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, TestThreatDetailsUrl); | 76 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, TestThreatDetailsUrl); |
| 77 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, | 77 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, |
| 78 TestReportThreatDetails); | 78 TestReportThreatDetails); |
| 79 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, | 79 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, |
| 80 TestReportSafeBrowsingHit); | 80 TestReportSafeBrowsingHit); |
| 81 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerCertReportingTest, |
| 82 UMAOnFailure); |
| 81 | 83 |
| 82 typedef std::set<std::unique_ptr<net::URLFetcher>> Reports; | 84 typedef std::set<std::unique_ptr<net::URLFetcher>> Reports; |
| 83 | 85 |
| 84 // Constructs a SafeBrowsingPingManager that issues network requests | 86 // Constructs a SafeBrowsingPingManager that issues network requests |
| 85 // using |request_context_getter|. | 87 // using |request_context_getter|. |
| 86 SafeBrowsingPingManager( | 88 SafeBrowsingPingManager( |
| 87 net::URLRequestContextGetter* request_context_getter, | 89 net::URLRequestContextGetter* request_context_getter, |
| 88 const SafeBrowsingProtocolConfig& config); | 90 const SafeBrowsingProtocolConfig& config); |
| 89 | 91 |
| 90 // Generates URL for reporting safe browsing hits. | 92 // Generates URL for reporting safe browsing hits. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 118 std::unique_ptr<PermissionReporter> permission_reporter_; | 120 std::unique_ptr<PermissionReporter> permission_reporter_; |
| 119 | 121 |
| 120 net::NetLogWithSource net_log_; | 122 net::NetLogWithSource net_log_; |
| 121 | 123 |
| 122 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingPingManager); | 124 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingPingManager); |
| 123 }; | 125 }; |
| 124 | 126 |
| 125 } // namespace safe_browsing | 127 } // namespace safe_browsing |
| 126 | 128 |
| 127 #endif // CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_ | 129 #endif // CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_ |
| OLD | NEW |