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

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

Issue 2964283002: Add chrome channel to cert logger reports (Closed)
Patch Set: Clean up test comments Created 3 years, 5 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 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_REPORT_H_ 5 #ifndef COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORT_H_
6 #define COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORT_H_ 6 #define COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 namespace base { 11 namespace base {
12 class Time; 12 class Time;
13 } // namespace base 13 } // namespace base
14 14
15 namespace network_time { 15 namespace network_time {
16 class NetworkTimeTracker; 16 class NetworkTimeTracker;
17 } // namespace network_time 17 } // namespace network_time
18 18
19 namespace net { 19 namespace net {
20 class SSLInfo; 20 class SSLInfo;
21 } // namespace net 21 } // namespace net
22 22
23 namespace version_info {
24 enum class Channel;
25 }
meacer 2017/06/30 22:24:46 You'll want to include version_info instead of for
sperigo 2017/06/30 23:37:28 Done.
26
23 namespace certificate_reporting { 27 namespace certificate_reporting {
24 28
25 class CertLoggerRequest; 29 class CertLoggerRequest;
26 30
27 // This class builds and serializes reports for invalid SSL certificate 31 // This class builds and serializes reports for invalid SSL certificate
28 // chains, intended to be sent with ErrorReporter. 32 // chains, intended to be sent with ErrorReporter.
29 class ErrorReport { 33 class ErrorReport {
30 public: 34 public:
31 // Describes the type of interstitial that the user was shown for the 35 // Describes the type of interstitial that the user was shown for the
32 // error that this report represents. Gets mapped to 36 // error that this report represents. Gets mapped to
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 bool Serialize(std::string* output) const; 70 bool Serialize(std::string* output) const;
67 71
68 void SetInterstitialInfo(const InterstitialReason& interstitial_reason, 72 void SetInterstitialInfo(const InterstitialReason& interstitial_reason,
69 const ProceedDecision& proceed_decision, 73 const ProceedDecision& proceed_decision,
70 const Overridable& overridable, 74 const Overridable& overridable,
71 const base::Time& interstitial_time); 75 const base::Time& interstitial_time);
72 76
73 void AddNetworkTimeInfo( 77 void AddNetworkTimeInfo(
74 const network_time::NetworkTimeTracker* network_time_tracker); 78 const network_time::NetworkTimeTracker* network_time_tracker);
75 79
80 void AddChromeChannel(const version_info::Channel channel);
meacer 2017/06/30 22:24:46 Since this is an enum, you can just pass it withou
sperigo 2017/06/30 23:37:28 Done.
81
76 // Sets is_retry_upload field of the protobuf to |is_retry_upload|. 82 // Sets is_retry_upload field of the protobuf to |is_retry_upload|.
77 void SetIsRetryUpload(bool is_retry_upload); 83 void SetIsRetryUpload(bool is_retry_upload);
78 84
79 // Gets the hostname to which this report corresponds. 85 // Gets the hostname to which this report corresponds.
80 const std::string& hostname() const; 86 const std::string& hostname() const;
81 87
82 // Returns true if the report has been retried. 88 // Returns true if the report has been retried.
83 bool is_retry_upload() const; 89 bool is_retry_upload() const;
84 90
85 private: 91 private:
86 std::unique_ptr<CertLoggerRequest> cert_report_; 92 std::unique_ptr<CertLoggerRequest> cert_report_;
87 }; 93 };
88 94
89 } // namespace certificate_reporting 95 } // namespace certificate_reporting
90 96
91 #endif // COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORT_H_ 97 #endif // COMPONENTS_CERTIFICATE_REPORTING_CERTIFICATE_ERROR_REPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698