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

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

Issue 183853011: Move TrimWhitespace to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/common/net/url_fixer_upper.cc ('k') | chrome/test/chromedriver/net/adb_client_socket.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 // See the corresponding header file for description of the functions in this 5 // See the corresponding header file for description of the functions in this
6 // file. 6 // file.
7 7
8 #include "chrome/installer/util/install_util.h" 8 #include "chrome/installer/util/install_util.h"
9 9
10 #include <shellapi.h> 10 #include <shellapi.h>
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 CommandLine::StringType params(cmd.GetCommandLineString()); 166 CommandLine::StringType params(cmd.GetCommandLineString());
167 if (params[0] == '"') { 167 if (params[0] == '"') {
168 DCHECK_EQ('"', params[program.length() + 1]); 168 DCHECK_EQ('"', params[program.length() + 1]);
169 DCHECK_EQ(program, params.substr(1, program.length())); 169 DCHECK_EQ(program, params.substr(1, program.length()));
170 params = params.substr(program.length() + 2); 170 params = params.substr(program.length() + 2);
171 } else { 171 } else {
172 DCHECK_EQ(program, params.substr(0, program.length())); 172 DCHECK_EQ(program, params.substr(0, program.length()));
173 params = params.substr(program.length()); 173 params = params.substr(program.length());
174 } 174 }
175 175
176 TrimWhitespace(params, TRIM_ALL, &params); 176 base::TrimWhitespace(params, base::TRIM_ALL, &params);
177 177
178 HWND uac_foreground_window = CreateUACForegroundWindow(); 178 HWND uac_foreground_window = CreateUACForegroundWindow();
179 179
180 SHELLEXECUTEINFO info = {0}; 180 SHELLEXECUTEINFO info = {0};
181 info.cbSize = sizeof(SHELLEXECUTEINFO); 181 info.cbSize = sizeof(SHELLEXECUTEINFO);
182 info.fMask = SEE_MASK_NOCLOSEPROCESS; 182 info.fMask = SEE_MASK_NOCLOSEPROCESS;
183 info.hwnd = uac_foreground_window; 183 info.hwnd = uac_foreground_window;
184 info.lpVerb = L"runas"; 184 info.lpVerb = L"runas";
185 info.lpFile = program.c_str(); 185 info.lpFile = program.c_str();
186 info.lpParameters = params.c_str(); 186 info.lpParameters = params.c_str();
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 // Open the program and see if it references the expected file. 599 // Open the program and see if it references the expected file.
600 base::File file; 600 base::File file;
601 BY_HANDLE_FILE_INFORMATION info = {}; 601 BY_HANDLE_FILE_INFORMATION info = {};
602 602
603 return (OpenForInfo(path, &file) && 603 return (OpenForInfo(path, &file) &&
604 GetInfo(file, &info) && 604 GetInfo(file, &info) &&
605 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber && 605 info.dwVolumeSerialNumber == file_info_.dwVolumeSerialNumber &&
606 info.nFileIndexHigh == file_info_.nFileIndexHigh && 606 info.nFileIndexHigh == file_info_.nFileIndexHigh &&
607 info.nFileIndexLow == file_info_.nFileIndexLow); 607 info.nFileIndexLow == file_info_.nFileIndexLow);
608 } 608 }
OLDNEW
« no previous file with comments | « chrome/common/net/url_fixer_upper.cc ('k') | chrome/test/chromedriver/net/adb_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698