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

Side by Side Diff: chrome/installer/util/version.cc

Issue 3750001: base: Move SplitString functions into the base namespace and update the callers. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: brett review, reverted changes in o3d due to it's using an old base revision Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/installer/util/version.h" 5 #include "chrome/installer/util/version.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 22 matching lines...) Expand all
33 ((major_ == other->major_) && (minor_ == other->minor_) 33 ((major_ == other->major_) && (minor_ == other->minor_)
34 && (build_ > other->build_)) || 34 && (build_ > other->build_)) ||
35 ((major_ == other->major_) && (minor_ == other->minor_) 35 ((major_ == other->major_) && (minor_ == other->minor_)
36 && (build_ == other->build_) 36 && (build_ == other->build_)
37 && (patch_ > other->patch_))); 37 && (patch_ > other->patch_)));
38 } 38 }
39 39
40 installer::Version* installer::Version::GetVersionFromString( 40 installer::Version* installer::Version::GetVersionFromString(
41 const string16& version_str) { 41 const string16& version_str) {
42 std::vector<string16> numbers; 42 std::vector<string16> numbers;
43 SplitString(version_str, '.', &numbers); 43 base::SplitString(version_str, '.', &numbers);
44 44
45 if (numbers.size() != 4) { 45 if (numbers.size() != 4) {
46 LOG(ERROR) << "Invalid version string: " << version_str; 46 LOG(ERROR) << "Invalid version string: " << version_str;
47 return NULL; 47 return NULL;
48 } 48 }
49 49
50 int64 v0, v1, v2, v3; 50 int64 v0, v1, v2, v3;
51 base::StringToInt64(numbers[0], &v0); 51 base::StringToInt64(numbers[0], &v0);
52 base::StringToInt64(numbers[1], &v1); 52 base::StringToInt64(numbers[1], &v1);
53 base::StringToInt64(numbers[2], &v2); 53 base::StringToInt64(numbers[2], &v2);
54 base::StringToInt64(numbers[3], &v3); 54 base::StringToInt64(numbers[3], &v3);
55 return new Version(v0, v1, v2, v3); 55 return new Version(v0, v1, v2, v3);
56 } 56 }
OLDNEW
« no previous file with comments | « chrome/installer/util/shell_util.cc ('k') | chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698