Chromium Code Reviews| Index: chrome/browser/safe_browsing/permission_reporter.cc |
| diff --git a/chrome/browser/safe_browsing/permission_reporter.cc b/chrome/browser/safe_browsing/permission_reporter.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9415d6ed1cf4e418dc6df0f6511e08a90f3476b6 |
| --- /dev/null |
| +++ b/chrome/browser/safe_browsing/permission_reporter.cc |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/safe_browsing/permission_reporter.h" |
| +#include "chrome/common/safe_browsing/permission_report.pb.h" |
| + |
| +using content::PermissionType; |
| + |
| +namespace safe_browsing { |
| + |
| +PermissionReporter::PermissionReporter(net::URLRequestContext* request_context, |
|
Nathan Parker
2016/05/31 22:24:57
How about having the URL hardcoded in this file (a
stefanocs
2016/06/01 01:36:34
Done.
|
| + const GURL& upload_url) |
| + : permission_report_sender_(new net::CertificateReportSender( |
| + request_context, |
| + net::CertificateReportSender::CookiesPreference:: |
| + DO_NOT_SEND_COOKIES)), |
| + upload_url_(upload_url) { |
| + DCHECK(permission_report_sender_); |
| + DCHECK(!upload_url.is_empty()); |
| +} |
| + |
| +PermissionReporter::~PermissionReporter() {} |
| + |
| +void PermissionReporter::SendReport(const std::string& serialized_report) { |
| + // TODO(stefanocs): Implement SendReport function. |
| +} |
| + |
| +bool PermissionReporter::BuildReport(const GURL& origin, |
| + PermissionType permission, |
| + PermissionAction action, |
| + std::string* output) { |
| + // TODO(stefanocs): Implement BuildReport function. |
| + return true; |
| +} |
| + |
| +} // namespace safe_browsing |