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

Side by Side Diff: components/certificate_reporting/error_reporter.h

Issue 2483993002: Add report_id to ErrorReporter interface. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_ 5 #ifndef COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_
6 #define COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_ 6 #define COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // |SendReport| actually sends the report over the network; callers are 54 // |SendReport| actually sends the report over the network; callers are
55 // responsible for enforcing any preconditions (such as obtaining user 55 // responsible for enforcing any preconditions (such as obtaining user
56 // opt-in, only sending reports for certain hostnames, checking for 56 // opt-in, only sending reports for certain hostnames, checking for
57 // incognito mode, etc.). 57 // incognito mode, etc.).
58 // 58 //
59 // On some platforms (but not all), ErrorReporter can use 59 // On some platforms (but not all), ErrorReporter can use
60 // an HTTP endpoint to send encrypted extended reporting reports. On 60 // an HTTP endpoint to send encrypted extended reporting reports. On
61 // unsupported platforms, callers must send extended reporting reports 61 // unsupported platforms, callers must send extended reporting reports
62 // over SSL. 62 // over SSL.
63 virtual void SendExtendedReportingReport( 63 virtual void SendExtendedReportingReport(
64 const std::string& serialized_report); 64 const std::string& serialized_report,
65 const base::Callback<void()>& success_callback,
66 const base::Callback<void(const GURL&, int)>& error_callback);
65 67
66 // Used by tests. 68 // Used by tests.
67 static bool DecryptErrorReport( 69 static bool DecryptErrorReport(
68 const uint8_t server_private_key[32], 70 const uint8_t server_private_key[32],
69 const EncryptedCertLoggerRequest& encrypted_report, 71 const EncryptedCertLoggerRequest& encrypted_report,
70 std::string* decrypted_serialized_report); 72 std::string* decrypted_serialized_report);
71 73
74 void set_upload_url_for_testing(const GURL& url) { upload_url_ = url; }
75
72 private: 76 private:
73 std::unique_ptr<net::ReportSender> certificate_report_sender_; 77 std::unique_ptr<net::ReportSender> certificate_report_sender_;
74 78
75 const GURL upload_url_; 79 GURL upload_url_;
76 80
77 const uint8_t* server_public_key_; 81 const uint8_t* server_public_key_;
78 const uint32_t server_public_key_version_; 82 const uint32_t server_public_key_version_;
79 83
80 DISALLOW_COPY_AND_ASSIGN(ErrorReporter); 84 DISALLOW_COPY_AND_ASSIGN(ErrorReporter);
81 }; 85 };
82 86
83 } // namespace certificate_reporting 87 } // namespace certificate_reporting
84 88
85 #endif // COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_ 89 #endif // COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/certificate_reporting_test_utils.cc ('k') | components/certificate_reporting/error_reporter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698