@@ -624,6 +624,8 @@ component("base") {
"strings/cstring_view.h",
"strings/durable_string_view.h",
"strings/escape.cc",
"strings/escape.h",
+ "strings/fake_simple_class.cc",
+ "strings/fake_simple_class.h",
"strings/latin1_string_conversions.cc",
"strings/latin1_string_conversions.h",
"strings/lazy_string_builder.cc",
new file mode 100644
@@ -0,0 +1,18 @@
+// Copyright 2025 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/strings/fake_simple_class.h"
+
+#include "base/logging.h"
+
+namespace base {
+
+FakeSimpleClass::FakeSimpleClass() = default;
+FakeSimpleClass::~FakeSimpleClass() = default;
+
+void FakeSimpleClass::ProcessStruct(const NestedStruct& s) {
+ if (s.field1) {
+ LOG(INFO) << "Field2: " << s.field2;
+ }
+}
+
+// static
+FakeSimpleClass::NestedStruct FakeSimpleClass::CreateNestedStruct(
+ bool field1,
+ const std::string& field2) {
+ NestedStruct s;
+ s.field1 = field1;
+ s.field2 = field2;
+ return s;
+}
+
+} // namespace base
new file mode 100644
@@ -0,0 +1,22 @@
+// Copyright 2025 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_STRINGS_FAKE_SIMPLE_CLASS_H_
+#define BASE_STRINGS_FAKE_SIMPLE_CLASS_H_
+
+#include <string>
+
+namespace base {
+
+class FakeSimpleClass {
+ public:
+ struct NestedStruct {
+ bool field1 = false;
+ std::string field2;
+ };
+
+ FakeSimpleClass();
+ ~FakeSimpleClass();
+
+ void ProcessStruct(const NestedStruct& s);
+ static NestedStruct CreateNestedStruct(bool field1, const std::string& field2);
+};
+
+} // namespace base
+
+#endif // BASE_STRINGS_FAKE_SIMPLE_CLASS_H_