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

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

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
« no previous file with comments | « chrome/browser/safe_browsing/ping_manager.h ('k') | chrome/browser/safe_browsing/ui_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/safe_browsing/ping_manager.h" 5 #include "chrome/browser/safe_browsing/ping_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 std::unique_ptr<certificate_reporting::ErrorReporter> 133 std::unique_ptr<certificate_reporting::ErrorReporter>
134 certificate_error_reporter) { 134 certificate_error_reporter) {
135 certificate_error_reporter_ = std::move(certificate_error_reporter); 135 certificate_error_reporter_ = std::move(certificate_error_reporter);
136 } 136 }
137 137
138 void SafeBrowsingPingManager::ReportPermissionAction( 138 void SafeBrowsingPingManager::ReportPermissionAction(
139 const GURL& origin, 139 const GURL& origin,
140 content::PermissionType permission, 140 content::PermissionType permission,
141 PermissionAction action, 141 PermissionAction action,
142 PermissionSourceUI source_ui, 142 PermissionSourceUI source_ui,
143 PermissionRequestGestureType gesture_type) { 143 PermissionRequestGestureType gesture_type,
144 int num_prior_dismissals,
145 int num_prior_ignores) {
144 permission_reporter_->SendReport(origin, permission, action, source_ui, 146 permission_reporter_->SendReport(origin, permission, action, source_ui,
145 gesture_type); 147 gesture_type, num_prior_dismissals, num_prior_ignores);
146 } 148 }
147 149
148 GURL SafeBrowsingPingManager::SafeBrowsingHitUrl( 150 GURL SafeBrowsingPingManager::SafeBrowsingHitUrl(
149 const safe_browsing::HitReport& hit_report) const { 151 const safe_browsing::HitReport& hit_report) const {
150 DCHECK(hit_report.threat_type == SB_THREAT_TYPE_URL_MALWARE || 152 DCHECK(hit_report.threat_type == SB_THREAT_TYPE_URL_MALWARE ||
151 hit_report.threat_type == SB_THREAT_TYPE_URL_PHISHING || 153 hit_report.threat_type == SB_THREAT_TYPE_URL_PHISHING ||
152 hit_report.threat_type == SB_THREAT_TYPE_URL_UNWANTED || 154 hit_report.threat_type == SB_THREAT_TYPE_URL_UNWANTED ||
153 hit_report.threat_type == SB_THREAT_TYPE_BINARY_MALWARE_URL || 155 hit_report.threat_type == SB_THREAT_TYPE_BINARY_MALWARE_URL ||
154 hit_report.threat_type == SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL || 156 hit_report.threat_type == SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL ||
155 hit_report.threat_type == SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL); 157 hit_report.threat_type == SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 version_.c_str()); 237 version_.c_str());
236 std::string api_key = google_apis::GetAPIKey(); 238 std::string api_key = google_apis::GetAPIKey();
237 if (!api_key.empty()) { 239 if (!api_key.empty()) {
238 base::StringAppendF(&url, "&key=%s", 240 base::StringAppendF(&url, "&key=%s",
239 net::EscapeQueryParamValue(api_key, true).c_str()); 241 net::EscapeQueryParamValue(api_key, true).c_str());
240 } 242 }
241 return GURL(url); 243 return GURL(url);
242 } 244 }
243 245
244 } // namespace safe_browsing 246 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/ping_manager.h ('k') | chrome/browser/safe_browsing/ui_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698