| Index: mojo/public/cpp/bindings/string.h
|
| diff --git a/mojo/public/cpp/bindings/string.h b/mojo/public/cpp/bindings/string.h
|
| index 7cfd713f66959bbaac1e17d92127039d11bf31c7..892cc1c29ffe885ec7122603bf11dbd6e269eba8 100644
|
| --- a/mojo/public/cpp/bindings/string.h
|
| +++ b/mojo/public/cpp/bindings/string.h
|
| @@ -7,10 +7,12 @@
|
|
|
| #include <stddef.h>
|
|
|
| +#include <functional>
|
| #include <string>
|
|
|
| #include "base/logging.h"
|
| #include "mojo/public/cpp/bindings/lib/array_internal.h"
|
| +#include "mojo/public/cpp/bindings/lib/hash_util.h"
|
| #include "mojo/public/cpp/bindings/type_converter.h"
|
|
|
| namespace mojo {
|
| @@ -193,4 +195,15 @@ struct TypeConverter<String, const char*> {
|
|
|
| } // namespace mojo
|
|
|
| +namespace std {
|
| +
|
| +template <>
|
| +struct hash<mojo::String> {
|
| + size_t operator()(const mojo::String& value) const {
|
| + return value.is_null() ? 0 : hash<std::string>()(value.get());
|
| + }
|
| +};
|
| +
|
| +} // namespace std
|
| +
|
| #endif // MOJO_PUBLIC_CPP_BINDINGS_STRING_H_
|
|
|