| Index: base/strings/nullable_string16.h
|
| diff --git a/base/strings/nullable_string16.h b/base/strings/nullable_string16.h
|
| index 73fe81e0842034eba4d918cafeb58dcd8d22f2a0..16dcfe23d38093195c91f9e5b549ebf23079d1e1 100644
|
| --- a/base/strings/nullable_string16.h
|
| +++ b/base/strings/nullable_string16.h
|
| @@ -5,6 +5,9 @@
|
| #ifndef BASE_STRINGS_NULLABLE_STRING16_H_
|
| #define BASE_STRINGS_NULLABLE_STRING16_H_
|
|
|
| +#include <iosfwd>
|
| +
|
| +#include "base/base_export.h"
|
| #include "base/strings/string16.h"
|
|
|
| namespace base {
|
| @@ -14,7 +17,7 @@ namespace base {
|
| // empty is meaningful.
|
| class NullableString16 {
|
| public:
|
| - NullableString16() : is_null_(false) { }
|
| + NullableString16() : is_null_(true) { }
|
| explicit NullableString16(bool is_null) : is_null_(is_null) { }
|
| NullableString16(const string16& string, bool is_null)
|
| : string_(string), is_null_(is_null) {
|
| @@ -28,6 +31,17 @@ class NullableString16 {
|
| bool is_null_;
|
| };
|
|
|
| +inline bool operator==(const NullableString16& a, const NullableString16& b) {
|
| + return a.is_null() == b.is_null() && a.string() == b.string();
|
| +}
|
| +
|
| +inline bool operator!=(const NullableString16& a, const NullableString16& b) {
|
| + return !(a == b);
|
| +}
|
| +
|
| +BASE_EXPORT std::ostream& operator<<(std::ostream& out,
|
| + const NullableString16& value);
|
| +
|
| } // namespace
|
|
|
| // TODO(avi) update users of NullableString16 to use the namespace and remove
|
|
|