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

Unified Diff: components/certificate_transparency/mock_log_dns_traffic.cc

Issue 2367523002: Merge LogDnsClient's QueryLeafIndex and QueryAuditProof methods (Closed)
Patch Set: Created 4 years, 3 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_transparency/mock_log_dns_traffic.cc
diff --git a/components/certificate_transparency/mock_log_dns_traffic.cc b/components/certificate_transparency/mock_log_dns_traffic.cc
index 47922c05b2a9bdb0aa519bcb0891365720f109ae..9afcc9f506c0bbaaec8184d92506ca3377e81513 100644
--- a/components/certificate_transparency/mock_log_dns_traffic.cc
+++ b/components/certificate_transparency/mock_log_dns_traffic.cc
@@ -7,10 +7,11 @@
#include <algorithm>
#include <numeric>
#include <vector>
#include "base/big_endian.h"
+#include "base/strings/string_number_conversions.h"
#include "base/sys_byteorder.h"
#include "base/test/test_timeouts.h"
#include "net/dns/dns_client.h"
#include "net/dns/dns_protocol.h"
#include "net/dns/dns_util.h"
@@ -202,10 +203,16 @@ void MockLogDnsTraffic::ExpectLeafIndexRequestAndResponse(
answer.insert(answer.begin(), static_cast<char>(leaf_index.size()));
ExpectRequestAndResponse(qname, answer);
}
+void MockLogDnsTraffic::ExpectLeafIndexRequestAndResponse(
+ base::StringPiece qname,
+ uint64_t leaf_index) {
+ ExpectLeafIndexRequestAndResponse(qname, base::Uint64ToString(leaf_index));
+}
+
void MockLogDnsTraffic::ExpectAuditProofRequestAndResponse(
base::StringPiece qname,
std::vector<std::string>::const_iterator audit_path_start,
std::vector<std::string>::const_iterator audit_path_end) {
// Join nodes in the audit path into a single string.

Powered by Google App Engine
This is Rietveld 408576698