7 #include "packager/app/gflags_hex_bytes.h"
9 #include "packager/base/strings/string_number_conversions.h"
13 bool ValidateHexString(
const char* flagname,
14 const std::string& value,
15 std::vector<uint8_t>* value_bytes) {
16 std::vector<uint8_t> temp_value_bytes;
17 if (!value.empty() && !base::HexStringToBytes(value, &temp_value_bytes)) {
18 printf(
"Invalid hex string for --%s: %s\n", flagname, value.c_str());
21 value_bytes->swap(temp_value_bytes);
All the methods that are virtual are virtual for mocking.