summaryrefslogtreecommitdiff
path: root/chromium/components/certificate_reporting
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-04-05 14:08:31 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-04-11 07:46:53 +0000
commit6a4cabb866f66d4128a97cdc6d9d08ce074f1247 (patch)
treeab00f70a5e89278d6a0d16ff0c42578dc4d84a2d /chromium/components/certificate_reporting
parente733310db58160074f574c429d48f8308c0afe17 (diff)
downloadqtwebengine-chromium-6a4cabb866f66d4128a97cdc6d9d08ce074f1247.tar.gz
BASELINE: Update Chromium to 57.0.2987.144
Change-Id: I29db402ff696c71a04c4dbaec822c2e53efe0267 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'chromium/components/certificate_reporting')
-rw-r--r--chromium/components/certificate_reporting/cert_logger.proto4
-rw-r--r--chromium/components/certificate_reporting/error_report.cc8
-rw-r--r--chromium/components/certificate_reporting/error_report.h6
-rw-r--r--chromium/components/certificate_reporting/error_report_unittest.cc1
-rw-r--r--chromium/components/certificate_reporting/error_reporter.h2
5 files changed, 20 insertions, 1 deletions
diff --git a/chromium/components/certificate_reporting/cert_logger.proto b/chromium/components/certificate_reporting/cert_logger.proto
index 452ec03c22c..e049841408a 100644
--- a/chromium/components/certificate_reporting/cert_logger.proto
+++ b/chromium/components/certificate_reporting/cert_logger.proto
@@ -126,4 +126,8 @@ message CertLoggerRequest {
// Information about features that were enabled or disabled for the
// user that might affect certificate validation.
optional CertLoggerFeaturesInfo features_info = 10;
+
+ // False when the report is attempted to be uploaded for the first time. True
+ // in all other uploads.
+ optional bool is_retry_upload = 11;
};
diff --git a/chromium/components/certificate_reporting/error_report.cc b/chromium/components/certificate_reporting/error_report.cc
index fac5e4bfdf0..86d345f4cc0 100644
--- a/chromium/components/certificate_reporting/error_report.cc
+++ b/chromium/components/certificate_reporting/error_report.cc
@@ -160,8 +160,16 @@ void ErrorReport::AddNetworkTimeInfo(
network_time_info->set_network_time_query_behavior(report_behavior);
}
+void ErrorReport::SetIsRetryUpload(bool is_retry_upload) {
+ cert_report_->set_is_retry_upload(is_retry_upload);
+}
+
const std::string& ErrorReport::hostname() const {
return cert_report_->hostname();
}
+bool ErrorReport::is_retry_upload() const {
+ return cert_report_->is_retry_upload();
+}
+
} // namespace certificate_reporting
diff --git a/chromium/components/certificate_reporting/error_report.h b/chromium/components/certificate_reporting/error_report.h
index 92ce5a50fc0..f9236e1aa77 100644
--- a/chromium/components/certificate_reporting/error_report.h
+++ b/chromium/components/certificate_reporting/error_report.h
@@ -72,9 +72,15 @@ class ErrorReport {
void AddNetworkTimeInfo(
const network_time::NetworkTimeTracker* network_time_tracker);
+ // Sets is_retry_upload field of the protobuf to |is_retry_upload|.
+ void SetIsRetryUpload(bool is_retry_upload);
+
// Gets the hostname to which this report corresponds.
const std::string& hostname() const;
+ // Returns true if the report has been retried.
+ bool is_retry_upload() const;
+
private:
std::unique_ptr<CertLoggerRequest> cert_report_;
};
diff --git a/chromium/components/certificate_reporting/error_report_unittest.cc b/chromium/components/certificate_reporting/error_report_unittest.cc
index 0ecd92277cc..9f68364b571 100644
--- a/chromium/components/certificate_reporting/error_report_unittest.cc
+++ b/chromium/components/certificate_reporting/error_report_unittest.cc
@@ -9,6 +9,7 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
+#include "base/memory/ptr_util.h"
#include "base/path_service.h"
#include "base/threading/thread.h"
#include "base/time/default_clock.h"
diff --git a/chromium/components/certificate_reporting/error_reporter.h b/chromium/components/certificate_reporting/error_reporter.h
index 7b2e1167ade..a02610862e2 100644
--- a/chromium/components/certificate_reporting/error_reporter.h
+++ b/chromium/components/certificate_reporting/error_reporter.h
@@ -11,13 +11,13 @@
#include <set>
#include <string>
+#include "base/callback.h"
#include "base/macros.h"
#include "net/url_request/report_sender.h"
#include "url/gurl.h"
namespace net {
class URLRequestContext;
-class SSLInfo;
}
namespace certificate_reporting {