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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 certificate_error_reporter); | 66 certificate_error_reporter); |
67 | 67 |
68 // Report permission action to SafeBrowsing servers. | 68 // Report permission action to SafeBrowsing servers. |
69 void ReportPermissionAction(const GURL& origin, | 69 void ReportPermissionAction(const GURL& origin, |
70 content::PermissionType permission, | 70 content::PermissionType permission, |
71 PermissionAction action, | 71 PermissionAction action, |
72 PermissionSourceUI source_ui, | 72 PermissionSourceUI source_ui, |
73 PermissionRequestGestureType gesture_type); | 73 PermissionRequestGestureType gesture_type); |
74 | 74 |
75 private: | 75 private: |
| 76 friend class PermissionReporterBrowserTest; |
76 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, | 77 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, |
77 TestSafeBrowsingHitUrl); | 78 TestSafeBrowsingHitUrl); |
78 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, TestThreatDetailsUrl); | 79 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, TestThreatDetailsUrl); |
79 | 80 |
80 typedef std::set<const net::URLFetcher*> Reports; | 81 typedef std::set<const net::URLFetcher*> Reports; |
81 | 82 |
82 // Constructs a SafeBrowsingPingManager that issues network requests | 83 // Constructs a SafeBrowsingPingManager that issues network requests |
83 // using |request_context_getter|. | 84 // using |request_context_getter|. |
84 SafeBrowsingPingManager( | 85 SafeBrowsingPingManager( |
85 net::URLRequestContextGetter* request_context_getter, | 86 net::URLRequestContextGetter* request_context_getter, |
(...skipping 28 matching lines...) Expand all Loading... |
114 | 115 |
115 // Sends reports of permission actions. | 116 // Sends reports of permission actions. |
116 std::unique_ptr<PermissionReporter> permission_reporter_; | 117 std::unique_ptr<PermissionReporter> permission_reporter_; |
117 | 118 |
118 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingPingManager); | 119 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingPingManager); |
119 }; | 120 }; |
120 | 121 |
121 } // namespace safe_browsing | 122 } // namespace safe_browsing |
122 | 123 |
123 #endif // CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_ | 124 #endif // CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_ |
OLD | NEW |