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

Side by Side Diff: chrome/installer/setup/setup_util.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/installer/util/helper_unittest.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) 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 // This file declares util functions for setup project. 5 // This file declares util functions for setup project.
6 6
7 #include "chrome/installer/setup/setup_util.h" 7 #include "chrome/installer/setup/setup_util.h"
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/string_util.h"
11 #include "chrome/installer/util/master_preferences.h" 12 #include "chrome/installer/util/master_preferences.h"
12 #include "chrome/installer/util/util_constants.h" 13 #include "chrome/installer/util/util_constants.h"
13 #include "courgette/courgette.h" 14 #include "courgette/courgette.h"
14 #include "third_party/bspatch/mbspatch.h" 15 #include "third_party/bspatch/mbspatch.h"
15 16
16 int installer::ApplyDiffPatch(const FilePath& src, 17 int installer::ApplyDiffPatch(const FilePath& src,
17 const FilePath& patch, 18 const FilePath& patch,
18 const FilePath& dest) { 19 const FilePath& dest) {
19 VLOG(1) << "Applying patch " << patch.value() << " to file " << src.value() 20 VLOG(1) << "Applying patch " << patch.value() << " to file " << src.value()
20 << " and generating file " << dest.value(); 21 << " and generating file " << dest.value();
(...skipping 17 matching lines...) Expand all
38 Version* version = NULL; 39 Version* version = NULL;
39 file_util::FileEnumerator version_enum(chrome_path, false, 40 file_util::FileEnumerator version_enum(chrome_path, false,
40 file_util::FileEnumerator::DIRECTORIES); 41 file_util::FileEnumerator::DIRECTORIES);
41 // TODO(tommi): The version directory really should match the version of 42 // TODO(tommi): The version directory really should match the version of
42 // setup.exe. To begin with, we should at least DCHECK that that's true. 43 // setup.exe. To begin with, we should at least DCHECK that that's true.
43 44
44 while (!version_enum.Next().empty()) { 45 while (!version_enum.Next().empty()) {
45 file_util::FileEnumerator::FindInfo find_data = {0}; 46 file_util::FileEnumerator::FindInfo find_data = {0};
46 version_enum.GetFindInfo(&find_data); 47 version_enum.GetFindInfo(&find_data);
47 VLOG(1) << "directory found: " << find_data.cFileName; 48 VLOG(1) << "directory found: " << find_data.cFileName;
48 version = Version::GetVersionFromString(find_data.cFileName); 49 version = Version::GetVersionFromString(WideToASCII(find_data.cFileName));
49 if (version) 50 if (version)
50 break; 51 break;
51 } 52 }
52 53
53 return version; 54 return version;
54 } 55 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/installer/util/helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698