| Index: chrome/common/string_ordinal.h
|
| diff --git a/chrome/common/string_ordinal.h b/chrome/common/string_ordinal.h
|
| index abe0fe42da124d0408ace5ba171f51d568798a84..f97bdf896019b956ac3f6f387451613f739516e1 100644
|
| --- a/chrome/common/string_ordinal.h
|
| +++ b/chrome/common/string_ordinal.h
|
| @@ -29,6 +29,11 @@ class StringOrdinal {
|
| // Creates an invalid StringOrdinal.
|
| StringOrdinal();
|
|
|
| + // Creates a valid initial StringOrdinal, this is called to create the first
|
| + // element of StringOrdinal list (i.e. before we have any other values we can
|
| + // generate from).
|
| + static StringOrdinal CreateInitialOrdinal();
|
| +
|
| bool IsValid() const;
|
|
|
| // All remaining functions can only be called if IsValid() holds.
|
| @@ -39,6 +44,9 @@ class StringOrdinal {
|
| // Returns true iff |*this| < |other|.
|
| bool LessThan(const StringOrdinal& other) const;
|
|
|
| + // Returns true iff |*this| > |other|.
|
| + bool GreaterThan(const StringOrdinal& other) const;
|
| +
|
| // Returns true iff |*this| == |other| (i.e. |*this| < |other| and
|
| // |other| < |*this| are both false).
|
| bool Equal(const StringOrdinal& other) const;
|
| @@ -69,4 +77,10 @@ class StringOrdinal {
|
| bool is_valid_;
|
| };
|
|
|
| +// A helper class that can be used by STL containers that require sorting.
|
| +class StringOrdinalLessThan {
|
| + public:
|
| + bool operator() (const StringOrdinal& lhs, const StringOrdinal& rhs) const;
|
| +};
|
| +
|
| #endif // CHROME_COMMON_STRING_ORDINAL_H_
|
|
|