| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_VERSION_H_ | 5 #ifndef BASE_VERSION_H_ |
| 6 #define BASE_VERSION_H_ | 6 #define BASE_VERSION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/base_export.h" | 11 #include "base/base_export.h" |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 | 13 |
| 14 namespace base { |
| 15 |
| 14 // Version represents a dotted version number, like "1.2.3.4", supporting | 16 // Version represents a dotted version number, like "1.2.3.4", supporting |
| 15 // parsing and comparison. | 17 // parsing and comparison. |
| 16 class BASE_EXPORT Version { | 18 class BASE_EXPORT Version { |
| 17 public: | 19 public: |
| 18 // The only thing you can legally do to a default constructed | 20 // The only thing you can legally do to a default constructed |
| 19 // Version object is assign to it. | 21 // Version object is assign to it. |
| 20 Version(); | 22 Version(); |
| 21 | 23 |
| 22 ~Version(); | 24 ~Version(); |
| 23 | 25 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 54 | 56 |
| 55 // Return the string representation of this version. | 57 // Return the string representation of this version. |
| 56 const std::string GetString() const; | 58 const std::string GetString() const; |
| 57 | 59 |
| 58 const std::vector<uint16>& components() const { return components_; } | 60 const std::vector<uint16>& components() const { return components_; } |
| 59 | 61 |
| 60 private: | 62 private: |
| 61 std::vector<uint16> components_; | 63 std::vector<uint16> components_; |
| 62 }; | 64 }; |
| 63 | 65 |
| 66 } // namespace base |
| 67 |
| 68 // TODO(xhwang) remove this when all users are updated to explicitly use the |
| 69 // namespace |
| 70 using base::Version; |
| 71 |
| 64 #endif // BASE_VERSION_H_ | 72 #endif // BASE_VERSION_H_ |
| OLD | NEW |