blob: ef5865505ecb22ab2b766872d9cfdd0198109b6a (
plain) (
tree)
|
|
diff --git a/components/qr_code_generator/BUILD.gn b/components/qr_code_generator/BUILD.gn
index c45d0c4039..ba2e27878b 100644
--- a/components/qr_code_generator/BUILD.gn
+++ b/components/qr_code_generator/BUILD.gn
@@ -3,7 +3,7 @@
# found in the LICENSE file.
import("//build/buildflag_header.gni")
-import("//build/config/rust.gni")
+# import("//build/config/rust.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
declare_args() {
@@ -40,20 +40,20 @@ source_set("qr_code_generator") {
]
deps = [
":qr_code_generator_features",
- ":qr_code_generator_ffi_glue",
+# ":qr_code_generator_ffi_glue",
"//base",
]
public_deps = [ "//base" ]
}
-rust_static_library("qr_code_generator_ffi_glue") {
- allow_unsafe = true # Needed for FFI that underpins the `cxx` crate.
- crate_root = "qr_code_generator_ffi_glue.rs"
- sources = [ "qr_code_generator_ffi_glue.rs" ]
- cxx_bindings = [ "qr_code_generator_ffi_glue.rs" ]
- visibility = [ ":qr_code_generator" ]
- deps = [ "//third_party/rust/qr_code/v2:lib" ]
-}
+#rust_static_library("qr_code_generator_ffi_glue") {
+# allow_unsafe = true # Needed for FFI that underpins the `cxx` crate.
+# crate_root = "qr_code_generator_ffi_glue.rs"
+# sources = [ "qr_code_generator_ffi_glue.rs" ]
+# cxx_bindings = [ "qr_code_generator_ffi_glue.rs" ]
+# visibility = [ ":qr_code_generator" ]
+# deps = [ "//third_party/rust/qr_code/v2:lib" ]
+#}
source_set("unit_tests") {
testonly = true
diff --git a/components/qr_code_generator/qr_code_generator.cc b/components/qr_code_generator/qr_code_generator.cc
index b1531f5026..da5a4c5382 100644
--- a/components/qr_code_generator/qr_code_generator.cc
+++ b/components/qr_code_generator/qr_code_generator.cc
@@ -11,12 +11,12 @@
#include <vector>
#include "base/check_op.h"
-#include "base/containers/span_rust.h"
+//#include "base/containers/span_rust.h"
#include "base/memory/raw_ptr.h"
#include "base/notreached.h"
#include "base/numerics/safe_conversions.h"
#include "components/qr_code_generator/features.h"
-#include "components/qr_code_generator/qr_code_generator_ffi_glue.rs.h"
+//#include "components/qr_code_generator/qr_code_generator_ffi_glue.rs.h"
namespace qr_code_generator {
@@ -572,7 +572,7 @@ size_t SegmentSpanLength(base::span<const QRCodeGenerator::Segment> segments) {
return sum;
}
-std::optional<QRCodeGenerator::GeneratedCode> GenerateQrCodeUsingRust(
+/*std::optional<QRCodeGenerator::GeneratedCode> GenerateQrCodeUsingRust(
base::span<const uint8_t> in,
std::optional<int> min_version) {
rust::Slice<const uint8_t> rs_in = base::SpanToRustSlice(in);
@@ -595,7 +595,7 @@ std::optional<QRCodeGenerator::GeneratedCode> GenerateQrCodeUsingRust(
code.qr_size = base::checked_cast<int>(result_width);
CHECK_EQ(code.data.size(), static_cast<size_t>(code.qr_size * code.qr_size));
return code;
-}
+}*/
} // namespace
@@ -613,9 +613,9 @@ QRCodeGenerator::GeneratedCode::~GeneratedCode() = default;
std::optional<QRCodeGenerator::GeneratedCode> QRCodeGenerator::Generate(
base::span<const uint8_t> in,
std::optional<int> min_version) {
- if (IsRustyQrCodeGeneratorFeatureEnabled()) {
+ /*if (IsRustyQrCodeGeneratorFeatureEnabled()) {
return GenerateQrCodeUsingRust(in, min_version);
- }
+ }*/
if (in.size() > kMaxInputSize) {
return std::nullopt;
|