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

Unified Diff: net/der/input.cc

Issue 1923433002: Certificate path builder for new certificate verification library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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: net/der/input.cc
diff --git a/net/der/input.cc b/net/der/input.cc
index 49955905fa2d1f3db570b8badb4362dab5763330..3b6037b124772bddde0e550b6f8cbda1ec345b20 100644
--- a/net/der/input.cc
+++ b/net/der/input.cc
@@ -16,6 +16,18 @@ namespace der {
Input::Input() : data_(nullptr), len_(0) {
}
+Input::Input(const Input& other, const Input& old_base, const Input& new_base)
+ : data_(other.data_ ? new_base.data_ + (other.data_ - old_base.data_)
+ : nullptr),
+ len_(other.len_) {
+ if (other.data_) {
+ DCHECK_EQ(new_base.len_, old_base.len_);
+ DCHECK_GE(data_, new_base.data_);
+ DCHECK_LE(data_ + len_, new_base.data_ + new_base.len_);
+ }
+ DCHECK(*this == other);
+}
+
Input::Input(const uint8_t* data, size_t len) : data_(data), len_(len) {
}
« net/cert/internal/path_builder.cc ('K') | « net/der/input.h ('k') | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698