Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Unified Diff: base/strings/nullable_string16.h

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/strings/latin1_string_conversions.cc ('k') | base/strings/nullable_string16.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/nullable_string16.h
diff --git a/base/strings/nullable_string16.h b/base/strings/nullable_string16.h
deleted file mode 100644
index 016c25c2501f996952ab42071482e1339652de0a..0000000000000000000000000000000000000000
--- a/base/strings/nullable_string16.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#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 {
-
-// This class is a simple wrapper for string16 which also contains a null
-// state. This should be used only where the difference between null and
-// empty is meaningful.
-class NullableString16 {
- public:
- NullableString16() : is_null_(true) { }
- NullableString16(const string16& string, bool is_null)
- : string_(string), is_null_(is_null) {
- }
-
- const string16& string() const { return string_; }
- bool is_null() const { return is_null_; }
-
- private:
- string16 string_;
- 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 base
-
-#endif // BASE_STRINGS_NULLABLE_STRING16_H_
« no previous file with comments | « base/strings/latin1_string_conversions.cc ('k') | base/strings/nullable_string16.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698