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

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

Issue 2164513002: Add browsertest for permission action reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-hooks-to-permission-layer2
Patch Set: Remove android tests + Move MockReportSender to separate file 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool user_gesture);
73 73
74 private: 74 private:
75 friend class PermissionReporterBrowserTest;
75 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, 76 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest,
76 TestSafeBrowsingHitUrl); 77 TestSafeBrowsingHitUrl);
77 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, TestThreatDetailsUrl); 78 FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest, TestThreatDetailsUrl);
78 79
79 typedef std::set<const net::URLFetcher*> Reports; 80 typedef std::set<const net::URLFetcher*> Reports;
80 81
81 // Constructs a SafeBrowsingPingManager that issues network requests 82 // Constructs a SafeBrowsingPingManager that issues network requests
82 // using |request_context_getter|. 83 // using |request_context_getter|.
83 SafeBrowsingPingManager( 84 SafeBrowsingPingManager(
84 net::URLRequestContextGetter* request_context_getter, 85 net::URLRequestContextGetter* request_context_getter,
(...skipping 28 matching lines...) Expand all
113 114
114 // Sends reports of permission actions. 115 // Sends reports of permission actions.
115 std::unique_ptr<PermissionReporter> permission_reporter_; 116 std::unique_ptr<PermissionReporter> permission_reporter_;
116 117
117 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingPingManager); 118 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingPingManager);
118 }; 119 };
119 120
120 } // namespace safe_browsing 121 } // namespace safe_browsing
121 122
122 #endif // CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_ 123 #endif // CHROME_BROWSER_SAFE_BROWSING_PING_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698