Chromium Code Reviews| 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 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 | 50 |
| 51 // Given a valid version object, compare if a |wildcard_string| results in a | 51 // Given a valid version object, compare if a |wildcard_string| results in a |
| 52 // newer version. This function will default to CompareTo if the string does | 52 // newer version. This function will default to CompareTo if the string does |
| 53 // not end in wildcard sequence ".*". IsValidWildcard(wildcard_string) must be | 53 // not end in wildcard sequence ".*". IsValidWildcard(wildcard_string) must be |
| 54 // true before using this function. | 54 // true before using this function. |
| 55 int CompareToWildcardString(const std::string& wildcard_string) const; | 55 int CompareToWildcardString(const std::string& wildcard_string) const; |
| 56 | 56 |
| 57 // Return the string representation of this version. | 57 // Return the string representation of this version. |
| 58 const std::string GetString() const; | 58 const std::string GetString() const; |
| 59 | 59 |
| 60 const std::vector<uint16>& components() const { return components_; } | 60 const std::vector<uint32>& components() const { return components_; } |
|
grt (UTC plus 2)
2015/03/09 13:19:49
please use uint32_t (and #include <stdint.h>) as p
Will Harris
2015/03/09 22:52:18
Done.
| |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 std::vector<uint16> components_; | 63 std::vector<uint32> components_; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace base | 66 } // namespace base |
| 67 | 67 |
| 68 // TODO(xhwang) remove this when all users are updated to explicitly use the | 68 // TODO(xhwang) remove this when all users are updated to explicitly use the |
| 69 // namespace | 69 // namespace |
| 70 using base::Version; | 70 using base::Version; |
| 71 | 71 |
| 72 #endif // BASE_VERSION_H_ | 72 #endif // BASE_VERSION_H_ |
| OLD | NEW |