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

Side by Side Diff: components/certificate_reporting/error_reporter_unittest.cc

Issue 1546143002: Switch to standard integer types in components/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 #include "components/certificate_reporting/error_reporter.h" 5 #include "components/certificate_reporting/error_reporter.h"
6 6
7 #include <stdint.h>
8 #include <string.h>
9
7 #include <set> 10 #include <set>
8 #include <string> 11 #include <string>
9 12
10 #include "base/bind.h" 13 #include "base/bind.h"
11 #include "base/bind_helpers.h" 14 #include "base/bind_helpers.h"
12 #include "base/macros.h" 15 #include "base/macros.h"
13 #include "components/certificate_reporting/encrypted_cert_logger.pb.h" 16 #include "components/certificate_reporting/encrypted_cert_logger.pb.h"
14 #include "crypto/curve25519.h" 17 #include "crypto/curve25519.h"
15 #include "net/url_request/certificate_report_sender.h" 18 #include "net/url_request/certificate_report_sender.h"
16 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
17 20
18 namespace certificate_reporting { 21 namespace certificate_reporting {
19 22
20 namespace { 23 namespace {
21 24
22 const char kDummyHttpReportUri[] = "http://example.test"; 25 const char kDummyHttpReportUri[] = "http://example.test";
23 const char kDummyHttpsReportUri[] = "https://example.test"; 26 const char kDummyHttpsReportUri[] = "https://example.test";
24 const char kDummyReport[] = "a dummy report"; 27 const char kDummyReport[] = "a dummy report";
25 const uint32 kServerPublicKeyTestVersion = 16; 28 const uint32_t kServerPublicKeyTestVersion = 16;
26 29
27 // A mock CertificateReportSender that keeps track of the last report 30 // A mock CertificateReportSender that keeps track of the last report
28 // sent. 31 // sent.
29 class MockCertificateReportSender : public net::CertificateReportSender { 32 class MockCertificateReportSender : public net::CertificateReportSender {
30 public: 33 public:
31 MockCertificateReportSender() 34 MockCertificateReportSender()
32 : net::CertificateReportSender(nullptr, DO_NOT_SEND_COOKIES) {} 35 : net::CertificateReportSender(nullptr, DO_NOT_SEND_COOKIES) {}
33 ~MockCertificateReportSender() override {} 36 ~MockCertificateReportSender() override {}
34 37
35 void Send(const GURL& report_uri, const std::string& report) override { 38 void Send(const GURL& report_uri, const std::string& report) override {
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 std::string(reinterpret_cast<const char*>(kSerializedEncryptedReport), 268 std::string(reinterpret_cast<const char*>(kSerializedEncryptedReport),
266 sizeof(kSerializedEncryptedReport)))); 269 sizeof(kSerializedEncryptedReport))));
267 ASSERT_TRUE(ErrorReporter::DecryptErrorReport( 270 ASSERT_TRUE(ErrorReporter::DecryptErrorReport(
268 server_private_key_, encrypted_request, &decrypted_serialized_report)); 271 server_private_key_, encrypted_request, &decrypted_serialized_report));
269 } 272 }
270 #endif 273 #endif
271 274
272 } // namespace 275 } // namespace
273 276
274 } // namespace certificate_reporting 277 } // namespace certificate_reporting
OLDNEW
« no previous file with comments | « components/certificate_reporting/error_reporter.cc ('k') | components/certificate_transparency/log_proof_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698