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

Unified Diff: components/certificate_reporting/error_report.cc

Issue 2964283002: Add chrome channel to cert logger reports (Closed)
Patch Set: Fix build errors 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 side-by-side diff with in-line comments
Download patch
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..e988ffc44eb2449ca30a44ae4da1f77fd40de81e 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,33 @@ void ErrorReport::AddNetworkTimeInfo(
network_time_info->set_network_time_query_behavior(report_behavior);
}
+void ErrorReport::AddChromeChannel(version_info::Channel channel) {
+ switch (channel) {
+ case version_info::Channel::STABLE:
+ cert_report_->set_chrome_channel(
+ CertLoggerRequest::CHROME_CHANNEL_STABLE);
+ break;
+
+ case version_info::Channel::BETA:
+ cert_report_->set_chrome_channel(CertLoggerRequest::CHROME_CHANNEL_BETA);
+ break;
+
+ case version_info::Channel::CANARY:
+ cert_report_->set_chrome_channel(
+ CertLoggerRequest::CHROME_CHANNEL_CANARY);
+ break;
+
+ case version_info::Channel::DEV:
+ cert_report_->set_chrome_channel(CertLoggerRequest::CHROME_CHANNEL_DEV);
+ break;
+
+ case version_info::Channel::UNKNOWN:
+ cert_report_->set_chrome_channel(
+ CertLoggerRequest::CHROME_CHANNEL_UNKNOWN);
+ break;
+ }
+}
+
void ErrorReport::SetIsRetryUpload(bool is_retry_upload) {
cert_report_->set_is_retry_upload(is_retry_upload);
}
@@ -182,6 +208,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();
}
« no previous file with comments | « components/certificate_reporting/error_report.h ('k') | components/certificate_reporting/error_report_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698