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

Side by Side Diff: chrome/browser/safe_browsing/ping_manager.h

Issue 2250893002: Permission Action Reporting: Add num_prior_* fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@par-new-fields-proto
Patch Set: todo Created 4 years, 4 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
OLDNEW
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 void SetCertificateErrorReporterForTesting( 64 void SetCertificateErrorReporterForTesting(
65 std::unique_ptr<certificate_reporting::ErrorReporter> 65 std::unique_ptr<certificate_reporting::ErrorReporter>
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 int num_prior_dismissals,
75 int num_prior_ignores);
74 76
75 private: 77 private:
76 friend class PermissionReporterBrowserTest; 78 friend class PermissionReporterBrowserTest;
77 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, 79 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest,
78 TestSafeBrowsingHitUrl); 80 TestSafeBrowsingHitUrl);
79 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, TestThreatDetailsUrl); 81 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, TestThreatDetailsUrl);
80 82
81 typedef std::set<const net::URLFetcher*> Reports; 83 typedef std::set<const net::URLFetcher*> Reports;
82 84
83 // Constructs a SafeBrowsingPingManager that issues network requests 85 // Constructs a SafeBrowsingPingManager that issues network requests
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 117
116 // Sends reports of permission actions. 118 // Sends reports of permission actions.
117 std::unique_ptr<PermissionReporter> permission_reporter_; 119 std::unique_ptr<PermissionReporter> permission_reporter_;
118 120
119 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingPingManager); 121 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingPingManager);
120 }; 122 };
121 123
122 } // namespace safe_browsing 124 } // namespace safe_browsing
123 125
124 #endif // CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_ 126 #endif // CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/permission_reporter_unittest.cc ('k') | chrome/browser/safe_browsing/ping_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698