Lines Matching refs:guid
5 #include "base/guid.h"
29 bool IsValidGUID(const std::string& guid) {
31 if (guid.length() != kGUIDLength)
34 for (size_t i = 0; i < guid.length(); ++i) {
35 char current = guid[i];
48 bool IsGUIDv4(const std::string& guid) {
49 // The format of GUID version 4 must be xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx,
51 return IsValidGUID(guid) && guid[14] == '4' &&
52 (guid[19] == '8' || guid[19] == '9' || guid[19] == 'A' ||
53 guid[19] == 'a' || guid[19] == 'B' || guid[19] == 'b');
74 std::string guid = GenerateGUID();
75 EXPECT_TRUE(IsValidGUID(guid));