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

Side by Side Diff: base/version.h

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « base/value_conversions.h ('k') | base/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/base_export.h" 12 #include "base/base_export.h"
12 #include "base/basictypes.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.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 51
51 // Given a valid version object, compare if a |wildcard_string| results in a 52 // 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 53 // newer version. This function will default to CompareTo if the string does
53 // not end in wildcard sequence ".*". IsValidWildcard(wildcard_string) must be 54 // not end in wildcard sequence ".*". IsValidWildcard(wildcard_string) must be
54 // true before using this function. 55 // true before using this function.
55 int CompareToWildcardString(const std::string& wildcard_string) const; 56 int CompareToWildcardString(const std::string& wildcard_string) const;
56 57
57 // Return the string representation of this version. 58 // Return the string representation of this version.
58 const std::string GetString() const; 59 const std::string GetString() const;
59 60
60 const std::vector<uint16>& components() const { return components_; } 61 const std::vector<uint32_t>& components() const { return components_; }
61 62
62 private: 63 private:
63 std::vector<uint16> components_; 64 std::vector<uint32_t> components_;
64 }; 65 };
65 66
66 } // namespace base 67 } // namespace base
67 68
68 // TODO(xhwang) remove this when all users are updated to explicitly use the 69 // TODO(xhwang) remove this when all users are updated to explicitly use the
69 // namespace 70 // namespace
70 using base::Version; 71 using base::Version;
71 72
72 #endif // BASE_VERSION_H_ 73 #endif // BASE_VERSION_H_
OLDNEW
« no previous file with comments | « base/value_conversions.h ('k') | base/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698