#include "components/optimization_guide/core/model_execution/on_device_model_execution_proto_descriptors.h"
#include "components/optimization_guide/core/optimization_guide_util.h"
#include "base/values.h"
#include "components/optimization_guide/proto/features/compose.pb.h"
#include "components/optimization_guide/proto/features/history_answer.pb.h"
#include "components/optimization_guide/proto/features/summarize.pb.h"
#include "components/optimization_guide/proto/features/tab_organization.pb.h"
#include "components/optimization_guide/proto/string_value.pb.h"
namespace optimization_guide {
namespace {
std::optional<proto::Value> GetProtoValue(
const google::protobuf::MessageLite& msg,
const proto::ProtoField& proto_field, int32_t index) { … }
std::optional<NestedMessageIterator> GetProtoRepeated(
const google::protobuf::MessageLite* msg,
const proto::ProtoField& proto_field,
int32_t index) { … }
std::optional<proto::Any> SetProtoValue(
const std::string& proto_name,
const proto::ProtoField& proto_field,
const std::string& value,
int32_t index) { … }
bool Convert_optimization_guide_proto_Answer(
const base::Value& object, optimization_guide::proto::Answer& proto);
bool Convert_optimization_guide_proto_Citation(
const base::Value& object, optimization_guide::proto::Citation& proto);
bool Convert_optimization_guide_proto_ComposeResponse(
const base::Value& object, optimization_guide::proto::ComposeResponse& proto);
bool Convert_optimization_guide_proto_HistoryAnswerResponse(
const base::Value& object, optimization_guide::proto::HistoryAnswerResponse& proto);
bool Convert_optimization_guide_proto_StringValue(
const base::Value& object, optimization_guide::proto::StringValue& proto);
bool Convert_optimization_guide_proto_Tab(
const base::Value& object, optimization_guide::proto::Tab& proto);
bool Convert_optimization_guide_proto_TabGroup(
const base::Value& object, optimization_guide::proto::TabGroup& proto);
bool Convert_optimization_guide_proto_TabOrganizationResponse(
const base::Value& object, optimization_guide::proto::TabOrganizationResponse& proto);
bool Convert_optimization_guide_proto_Answer(
const base::Value& object, optimization_guide::proto::Answer& proto) { … }
bool Convert_optimization_guide_proto_Citation(
const base::Value& object, optimization_guide::proto::Citation& proto) { … }
bool Convert_optimization_guide_proto_ComposeResponse(
const base::Value& object, optimization_guide::proto::ComposeResponse& proto) { … }
bool Convert_optimization_guide_proto_HistoryAnswerResponse(
const base::Value& object, optimization_guide::proto::HistoryAnswerResponse& proto) { … }
bool Convert_optimization_guide_proto_StringValue(
const base::Value& object, optimization_guide::proto::StringValue& proto) { … }
bool Convert_optimization_guide_proto_Tab(
const base::Value& object, optimization_guide::proto::Tab& proto) { … }
bool Convert_optimization_guide_proto_TabGroup(
const base::Value& object, optimization_guide::proto::TabGroup& proto) { … }
bool Convert_optimization_guide_proto_TabOrganizationResponse(
const base::Value& object, optimization_guide::proto::TabOrganizationResponse& proto) { … }
}
std::optional<proto::Value> GetProtoValue(
const google::protobuf::MessageLite& msg,
const proto::ProtoField& proto_field) { … }
std::optional<NestedMessageIterator> GetProtoRepeated(
const google::protobuf::MessageLite* msg,
const proto::ProtoField& proto_field) { … }
std::unique_ptr<google::protobuf::MessageLite> GetProtoFromAny(
const proto::Any& msg) { … }
std::optional<proto::Any> SetProtoValue(
const std::string& proto_name,
const proto::ProtoField& proto_field,
const std::string& value) { … }
const google::protobuf::MessageLite* NestedMessageIterator::Get() const { … }
std::optional<proto::Any> ConvertToAnyWrappedProto(
const base::Value& object, const std::string& type_name) { … }
NestedMessageIterator::NestedMessageIterator(
const google::protobuf::MessageLite* parent,
int32_t tag_number,
int32_t field_size,
int32_t offset) : … { … }
}