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

Unified Diff: chrome/installer/util/package.cc

Issue 5848005: base/version: remove wstring version (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: retry Created 10 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/install_util.cc ('k') | chrome/installer/util/package_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/package.cc
diff --git a/chrome/installer/util/package.cc b/chrome/installer/util/package.cc
index c2fff7b4c0589f447bd5d8b1f21afb1eb60ff4fd..653c5fcb3577552e04215b9372260debd6856f8d 100644
--- a/chrome/installer/util/package.cc
+++ b/chrome/installer/util/package.cc
@@ -6,6 +6,7 @@
#include "base/file_util.h"
#include "base/logging.h"
+#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "base/win/registry.h"
#include "chrome/installer/util/channel_info.h"
@@ -87,7 +88,8 @@ Version* Package::GetCurrentVersion() const {
chrome_key.ReadValue(google_update::kRegVersionField, &version);
if (!version.empty()) {
- scoped_ptr<Version> this_version(Version::GetVersionFromString(version));
+ scoped_ptr<Version> this_version(Version::GetVersionFromString(
+ WideToASCII(version)));
if (this_version.get()) {
if (!current_version.get() ||
(current_version->CompareTo(*this_version) > 0)) {
@@ -117,7 +119,8 @@ void Package::RemoveOldVersionDirectories(
file_util::FileEnumerator::FindInfo find_data = {0};
version_enum.GetFindInfo(&find_data);
VLOG(1) << "directory found: " << find_data.cFileName;
- version.reset(Version::GetVersionFromString(find_data.cFileName));
+ version.reset(Version::GetVersionFromString(
+ WideToASCII(find_data.cFileName)));
if (version.get() && (latest_version.CompareTo(*version) > 0)) {
std::vector<FilePath> key_files;
for (Products::const_iterator it = products_.begin();
« no previous file with comments | « chrome/installer/util/install_util.cc ('k') | chrome/installer/util/package_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698