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 <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/base_export.h" | 12 #include "base/base_export.h" |
| 13 #include "base/basictypes.h" |
13 | 14 |
14 namespace base { | 15 namespace base { |
15 | 16 |
16 // Version represents a dotted version number, like "1.2.3.4", supporting | 17 // Version represents a dotted version number, like "1.2.3.4", supporting |
17 // parsing and comparison. | 18 // parsing and comparison. |
18 class BASE_EXPORT Version { | 19 class BASE_EXPORT Version { |
19 public: | 20 public: |
20 // The only thing you can legally do to a default constructed | 21 // The only thing you can legally do to a default constructed |
21 // Version object is assign to it. | 22 // Version object is assign to it. |
22 Version(); | 23 Version(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 const std::string GetString() const; | 59 const std::string GetString() const; |
59 | 60 |
60 const std::vector<uint32_t>& components() const { return components_; } | 61 const std::vector<uint32_t>& components() const { return components_; } |
61 | 62 |
62 private: | 63 private: |
63 std::vector<uint32_t> components_; | 64 std::vector<uint32_t> components_; |
64 }; | 65 }; |
65 | 66 |
66 } // namespace base | 67 } // namespace base |
67 | 68 |
| 69 // TODO(xhwang) remove this when all users are updated to explicitly use the |
| 70 // namespace |
| 71 using base::Version; |
| 72 |
68 #endif // BASE_VERSION_H_ | 73 #endif // BASE_VERSION_H_ |
OLD | NEW |