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

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

Issue 3076013: Move ASCIIToWide and ASCIIToUTF16 to utf_string_conversions.h. I've found it... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 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 <vector> 5 #include <vector>
6 6
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h"
9 #include "chrome/installer/util/version.h" 10 #include "chrome/installer/util/version.h"
10 11
11 installer::Version::Version(int64 major, int64 minor, int64 build, 12 installer::Version::Version(int64 major, int64 minor, int64 build,
12 int64 patch) 13 int64 patch)
13 : major_(major), 14 : major_(major),
14 minor_(minor), 15 minor_(minor),
15 build_(build), 16 build_(build),
16 patch_(patch) { 17 patch_(patch) {
17 version_str_ = ASCIIToUTF16( 18 version_str_ = ASCIIToUTF16(
18 StringPrintf("%" PRId64 ".%" PRId64 ".%" PRId64 ".%" PRId64, 19 StringPrintf("%" PRId64 ".%" PRId64 ".%" PRId64 ".%" PRId64,
(...skipping 19 matching lines...) Expand all
38 SplitString(version_str, '.', &numbers); 39 SplitString(version_str, '.', &numbers);
39 40
40 if (numbers.size() != 4) { 41 if (numbers.size() != 4) {
41 LOG(ERROR) << "Invalid version string: " << version_str; 42 LOG(ERROR) << "Invalid version string: " << version_str;
42 return NULL; 43 return NULL;
43 } 44 }
44 45
45 return new Version(StringToInt64(numbers[0]), StringToInt64(numbers[1]), 46 return new Version(StringToInt64(numbers[0]), StringToInt64(numbers[1]),
46 StringToInt64(numbers[2]), StringToInt64(numbers[3])); 47 StringToInt64(numbers[2]), StringToInt64(numbers[3]));
47 } 48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698