| Index: components/certificate_reporting/error_report.cc
|
| diff --git a/components/certificate_reporting/error_report.cc b/components/certificate_reporting/error_report.cc
|
| index ebc41f55a7b708a7450cbc920a6cd3701682d299..e722d5ab583870332a4f0bb2addfb65c1a4d0037 100644
|
| --- a/components/certificate_reporting/error_report.cc
|
| +++ b/components/certificate_reporting/error_report.cc
|
| @@ -9,7 +9,6 @@
|
| #include "base/stl_util.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/time/time.h"
|
| -#include "components/certificate_reporting/cert_logger.pb.h"
|
| #include "components/network_time/network_time_tracker.h"
|
| #include "net/cert/cert_status_flags.h"
|
| #include "net/cert/x509_certificate.h"
|
| @@ -174,6 +173,32 @@ void ErrorReport::AddNetworkTimeInfo(
|
| network_time_info->set_network_time_query_behavior(report_behavior);
|
| }
|
|
|
| +void ErrorReport::AddChromeChannel(version_info::Channel channel) {
|
| + CertLoggerRequest::ChromeChannel code;
|
| + switch (channel) {
|
| + case version_info::Channel::STABLE:
|
| + code = CertLoggerRequest::CHROME_CHANNEL_STABLE;
|
| + break;
|
| +
|
| + case version_info::Channel::BETA:
|
| + code = CertLoggerRequest::CHROME_CHANNEL_BETA;
|
| + break;
|
| +
|
| + case version_info::Channel::CANARY:
|
| + code = CertLoggerRequest::CHROME_CHANNEL_CANARY;
|
| + break;
|
| +
|
| + case version_info::Channel::DEV:
|
| + code = CertLoggerRequest::CHROME_CHANNEL_DEV;
|
| + break;
|
| +
|
| + case version_info::Channel::UNKNOWN:
|
| + code = CertLoggerRequest::CHROME_CHANNEL_UNKNOWN;
|
| + break;
|
| + }
|
| + cert_report_->set_chrome_channel(code);
|
| +}
|
| +
|
| void ErrorReport::SetIsRetryUpload(bool is_retry_upload) {
|
| cert_report_->set_is_retry_upload(is_retry_upload);
|
| }
|
| @@ -182,6 +207,10 @@ const std::string& ErrorReport::hostname() const {
|
| return cert_report_->hostname();
|
| }
|
|
|
| +CertLoggerRequest::ChromeChannel ErrorReport::chrome_channel() const {
|
| + return cert_report_->chrome_channel();
|
| +}
|
| +
|
| bool ErrorReport::is_retry_upload() const {
|
| return cert_report_->is_retry_upload();
|
| }
|
|
|