From c5bb844509c042dcda288d8675d88500488351f0 Mon Sep 17 00:00:00 2001 From: Suet-Fei Li Date: Thu, 8 Dec 2022 16:06:49 -0800 Subject: [PATCH] Internal bug fix. PiperOrigin-RevId: 494020404 --- internal/crypto/aead.cc | 5 +++++ internal/crypto/ec_private_key.cc | 5 +++++ internal/crypto/encryptor.cc | 5 +++++ internal/crypto/hkdf.cc | 5 +++++ internal/crypto/hmac.cc | 5 +++++ internal/crypto/nearby_base.cc | 5 +++++ internal/crypto/rsa_private_key.cc | 5 +++++ internal/crypto/signature_verifier.cc | 5 +++++ internal/crypto/symmetric_key.cc | 5 +++++ internal/platform/borrowable.h | 5 +++++ internal/platform/logging.h | 2 +- 11 files changed, 51 insertions(+), 1 deletion(-) diff --git a/internal/crypto/aead.cc b/internal/crypto/aead.cc index 86ed1c2c..7f74c117 100644 --- a/internal/crypto/aead.cc +++ b/internal/crypto/aead.cc @@ -21,7 +21,12 @@ #include #include +#ifdef NEARBY_CHROMIUM +#include "base/check.h" +#else #include "absl/log/check.h" +#endif + #include "absl/types/span.h" #include "internal/crypto/nearby_base.h" #include "internal/crypto/openssl_util.h" diff --git a/internal/crypto/ec_private_key.cc b/internal/crypto/ec_private_key.cc index 0bb3696a..8b0dac63 100644 --- a/internal/crypto/ec_private_key.cc +++ b/internal/crypto/ec_private_key.cc @@ -23,7 +23,12 @@ #include #include +#ifdef NEARBY_CHROMIUM +#include "base/check.h" +#else #include "absl/log/check.h" +#endif + #include "internal/crypto/openssl_util.h" #include #include diff --git a/internal/crypto/encryptor.cc b/internal/crypto/encryptor.cc index d765faa4..0362b36a 100644 --- a/internal/crypto/encryptor.cc +++ b/internal/crypto/encryptor.cc @@ -22,7 +22,12 @@ #include #include +#ifdef NEARBY_CHROMIUM +#include "base/check.h" +#else #include "absl/log/check.h" +#endif + #include "absl/log/log.h" #include "absl/strings/string_view.h" #include "absl/types/span.h" diff --git a/internal/crypto/hkdf.cc b/internal/crypto/hkdf.cc index 808aebab..3df41b34 100644 --- a/internal/crypto/hkdf.cc +++ b/internal/crypto/hkdf.cc @@ -21,7 +21,12 @@ #include #include +#ifdef NEARBY_CHROMIUM +#include "base/check.h" +#else #include "absl/log/check.h" +#endif + #include "absl/strings/string_view.h" #include "internal/crypto/hkdf.h" #include "internal/crypto/hmac.h" diff --git a/internal/crypto/hmac.cc b/internal/crypto/hmac.cc index 43a96558..4c2c153c 100644 --- a/internal/crypto/hmac.cc +++ b/internal/crypto/hmac.cc @@ -19,7 +19,12 @@ #include #include +#ifdef NEARBY_CHROMIUM +#include "base/check.h" +#else #include "absl/log/check.h" +#endif + #include "internal/crypto/hmac.h" #include "internal/crypto/nearby_base.h" #include "internal/crypto/openssl_util.h" diff --git a/internal/crypto/nearby_base.cc b/internal/crypto/nearby_base.cc index 4369348c..39989386 100644 --- a/internal/crypto/nearby_base.cc +++ b/internal/crypto/nearby_base.cc @@ -18,7 +18,12 @@ #include #include +#ifdef NEARBY_CHROMIUM +#include "base/check.h" +#else #include "absl/log/check.h" +#endif + #include "absl/types/span.h" namespace nearbybase { diff --git a/internal/crypto/rsa_private_key.cc b/internal/crypto/rsa_private_key.cc index c0a19d47..d1cbe8b8 100644 --- a/internal/crypto/rsa_private_key.cc +++ b/internal/crypto/rsa_private_key.cc @@ -20,7 +20,12 @@ #include #include +#ifdef NEARBY_CHROMIUM +#include "base/check.h" +#else #include "absl/log/check.h" +#endif + #include "absl/types/span.h" #include "internal/crypto/openssl_util.h" #include diff --git a/internal/crypto/signature_verifier.cc b/internal/crypto/signature_verifier.cc index 8793acf1..b709624d 100644 --- a/internal/crypto/signature_verifier.cc +++ b/internal/crypto/signature_verifier.cc @@ -16,7 +16,12 @@ #include +#ifdef NEARBY_CHROMIUM +#include "base/check.h" +#else #include "absl/log/check.h" +#endif + #include "internal/crypto/openssl_util.h" #include #include diff --git a/internal/crypto/symmetric_key.cc b/internal/crypto/symmetric_key.cc index 0a43f5d6..3dc93eef 100644 --- a/internal/crypto/symmetric_key.cc +++ b/internal/crypto/symmetric_key.cc @@ -22,7 +22,12 @@ #include #include +#ifdef NEARBY_CHROMIUM +#include "base/check.h" +#else #include "absl/log/check.h" +#endif + #include "internal/crypto/nearby_base.h" #include "internal/crypto/openssl_util.h" #include diff --git a/internal/platform/borrowable.h b/internal/platform/borrowable.h index 8de9330e..1b8bd1e5 100644 --- a/internal/platform/borrowable.h +++ b/internal/platform/borrowable.h @@ -37,7 +37,12 @@ #include #include +#ifdef NEARBY_CHROMIUM +#include "base/check.h" +#else #include "absl/log/check.h" +#endif + #include "internal/platform/mutex.h" #include "internal/platform/mutex_lock.h" diff --git a/internal/platform/logging.h b/internal/platform/logging.h index 8a6d6b9a..722c963b 100644 --- a/internal/platform/logging.h +++ b/internal/platform/logging.h @@ -18,7 +18,7 @@ // base/logging.h is only included to allow logging clients to include CHECK's. // In Chrome this is base/check.h. See crbug/1212611. #ifdef NEARBY_CHROMIUM -#include "absl/log/check.h" +#include "base/check.h" // base/logging.h is available externally as "glog". However, this repo contains // template files that can't be built by Swift Package Manager. To build with // SPM we only need CHECK and DCHECK defined.