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

Side by Side Diff: net/url_request/url_request_unittest.cc

Issue 2944953002: Add effective-expiration-date to Expect-CT reports (Closed)
Patch Set: meacer comments Created 3 years, 6 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
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <memory> 5 #include <memory>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 6686 matching lines...) Expand 10 before | Expand all | Expand 10 after
6697 6697
6698 // An ExpectCTReporter that records the number of times OnExpectCTFailed() was 6698 // An ExpectCTReporter that records the number of times OnExpectCTFailed() was
6699 // called. 6699 // called.
6700 class MockExpectCTReporter : public TransportSecurityState::ExpectCTReporter { 6700 class MockExpectCTReporter : public TransportSecurityState::ExpectCTReporter {
6701 public: 6701 public:
6702 MockExpectCTReporter() : num_failures_(0) {} 6702 MockExpectCTReporter() : num_failures_(0) {}
6703 ~MockExpectCTReporter() override {} 6703 ~MockExpectCTReporter() override {}
6704 6704
6705 void OnExpectCTFailed(const HostPortPair& host_port_pair, 6705 void OnExpectCTFailed(const HostPortPair& host_port_pair,
6706 const GURL& report_uri, 6706 const GURL& report_uri,
6707 base::Time expiration,
6707 const X509Certificate* validated_certificate_chain, 6708 const X509Certificate* validated_certificate_chain,
6708 const X509Certificate* served_certificate_chain, 6709 const X509Certificate* served_certificate_chain,
6709 const SignedCertificateTimestampAndStatusList& 6710 const SignedCertificateTimestampAndStatusList&
6710 signed_certificate_timestamps) override { 6711 signed_certificate_timestamps) override {
6711 num_failures_++; 6712 num_failures_++;
6712 } 6713 }
6713 6714
6714 uint32_t num_failures() { return num_failures_; } 6715 uint32_t num_failures() { return num_failures_; }
6715 6716
6716 private: 6717 private:
(...skipping 4627 matching lines...) Expand 10 before | Expand all | Expand 10 after
11344 AddTestInterceptor()->set_main_intercept_job(std::move(job)); 11345 AddTestInterceptor()->set_main_intercept_job(std::move(job));
11345 11346
11346 req->Start(); 11347 req->Start();
11347 req->Cancel(); 11348 req->Cancel();
11348 base::RunLoop().RunUntilIdle(); 11349 base::RunLoop().RunUntilIdle();
11349 EXPECT_EQ(ERR_ABORTED, d.request_status()); 11350 EXPECT_EQ(ERR_ABORTED, d.request_status());
11350 EXPECT_EQ(0, d.received_redirect_count()); 11351 EXPECT_EQ(0, d.received_redirect_count());
11351 } 11352 }
11352 11353
11353 } // namespace net 11354 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698