| Index: util/misc/uuid.h
|
| diff --git a/util/misc/uuid.h b/util/misc/uuid.h
|
| index 29b36bc09b8c8c26ded6dd6e63effa7d23b5fb87..f25aa652f64a79adec50bca17e8e2ec6580a337d 100644
|
| --- a/util/misc/uuid.h
|
| +++ b/util/misc/uuid.h
|
| @@ -41,6 +41,16 @@ struct UUID {
|
| //! \brief Initializes the %UUID to zero.
|
| UUID();
|
|
|
| + //! \brief Tag to pass to constructor to indicate it should initialize with
|
| + //! generated data.
|
| + struct InitializeWithNewTag {};
|
| +
|
| + //! \brief Initializes the %UUID using a standard system facility to generate
|
| + //! the value.
|
| + //!
|
| + //! CHECKs on failure with a message logged.
|
| + explicit UUID(InitializeWithNewTag);
|
| +
|
| //! \copydoc InitializeFromBytes()
|
| explicit UUID(const uint8_t* bytes);
|
|
|
| @@ -67,6 +77,13 @@ struct UUID {
|
| //! parsed, with the object state untouched.
|
| bool InitializeFromString(const base::StringPiece& string);
|
|
|
| + //! \brief Initializes the %UUID using a standard system facility to generate
|
| + //! the value.
|
| + //!
|
| + //! \return `true` if the %UUID was initialized correctly, `false` otherwise
|
| + //! with a message logged.
|
| + bool InitializeWithNew();
|
| +
|
| #if defined(OS_WIN) || DOXYGEN
|
| //! \brief Initializes the %UUID from a system `UUID` or `GUID` structure.
|
| //!
|
|
|