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

Side by Side Diff: chrome/installer/setup/setup_util.cc

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | chrome/installer/setup/uninstall.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 // 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 <windows.h> 9 #include <windows.h>
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 scoped_ptr<Version> max_version(new Version("0.0.0.0")); 132 scoped_ptr<Version> max_version(new Version("0.0.0.0"));
133 bool version_found = false; 133 bool version_found = false;
134 134
135 while (!version_enum.Next().empty()) { 135 while (!version_enum.Next().empty()) {
136 file_util::FileEnumerator::FindInfo find_data = {0}; 136 file_util::FileEnumerator::FindInfo find_data = {0};
137 version_enum.GetFindInfo(&find_data); 137 version_enum.GetFindInfo(&find_data);
138 VLOG(1) << "directory found: " << find_data.cFileName; 138 VLOG(1) << "directory found: " << find_data.cFileName;
139 139
140 scoped_ptr<Version> found_version( 140 scoped_ptr<Version> found_version(
141 new Version(WideToASCII(find_data.cFileName))); 141 new Version(base::WideToASCII(find_data.cFileName)));
142 if (found_version->IsValid() && 142 if (found_version->IsValid() &&
143 found_version->CompareTo(*max_version.get()) > 0) { 143 found_version->CompareTo(*max_version.get()) > 0) {
144 max_version.reset(found_version.release()); 144 max_version.reset(found_version.release());
145 version_found = true; 145 version_found = true;
146 } 146 }
147 } 147 }
148 148
149 return (version_found ? max_version.release() : NULL); 149 return (version_found ? max_version.release() : NULL);
150 } 150 }
151 151
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } 345 }
346 346
347 ScopedTokenPrivilege::~ScopedTokenPrivilege() { 347 ScopedTokenPrivilege::~ScopedTokenPrivilege() {
348 if (is_enabled_ && previous_privileges_.PrivilegeCount != 0) { 348 if (is_enabled_ && previous_privileges_.PrivilegeCount != 0) {
349 ::AdjustTokenPrivileges(token_, FALSE, &previous_privileges_, 349 ::AdjustTokenPrivileges(token_, FALSE, &previous_privileges_,
350 sizeof(TOKEN_PRIVILEGES), NULL, NULL); 350 sizeof(TOKEN_PRIVILEGES), NULL, NULL);
351 } 351 }
352 } 352 }
353 353
354 } // namespace installer 354 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | chrome/installer/setup/uninstall.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698