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

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

Issue 7386002: Rename CommandLine::GetCommandLineString(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge. Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return foreground_window; 111 return foreground_window;
112 } 112 }
113 113
114 } // namespace 114 } // namespace
115 115
116 bool InstallUtil::ExecuteExeAsAdmin(const CommandLine& cmd, DWORD* exit_code) { 116 bool InstallUtil::ExecuteExeAsAdmin(const CommandLine& cmd, DWORD* exit_code) {
117 FilePath::StringType program(cmd.GetProgram().value()); 117 FilePath::StringType program(cmd.GetProgram().value());
118 DCHECK(!program.empty()); 118 DCHECK(!program.empty());
119 DCHECK_NE(program[0], L'\"'); 119 DCHECK_NE(program[0], L'\"');
120 120
121 CommandLine::StringType params(cmd.command_line_string()); 121 CommandLine::StringType params(cmd.GetCommandLineString());
122 if (params[0] == '"') { 122 if (params[0] == '"') {
123 DCHECK_EQ('"', params[program.length() + 1]); 123 DCHECK_EQ('"', params[program.length() + 1]);
124 DCHECK_EQ(program, params.substr(1, program.length())); 124 DCHECK_EQ(program, params.substr(1, program.length()));
125 params = params.substr(program.length() + 2); 125 params = params.substr(program.length() + 2);
126 } else { 126 } else {
127 DCHECK_EQ(program, params.substr(0, program.length())); 127 DCHECK_EQ(program, params.substr(0, program.length()));
128 params = params.substr(program.length()); 128 params = params.substr(program.length());
129 } 129 }
130 130
131 TrimWhitespace(params, TRIM_ALL, &params); 131 TrimWhitespace(params, TRIM_ALL, &params);
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 int len = GetDateFormatW(LOCALE_INVARIANT, 0, NULL, kDateFormat, 437 int len = GetDateFormatW(LOCALE_INVARIANT, 0, NULL, kDateFormat,
438 date_str, arraysize(date_str)); 438 date_str, arraysize(date_str));
439 if (len) { 439 if (len) {
440 --len; // Subtract terminating \0. 440 --len; // Subtract terminating \0.
441 } else { 441 } else {
442 PLOG(DFATAL) << "GetDateFormat"; 442 PLOG(DFATAL) << "GetDateFormat";
443 } 443 }
444 444
445 return std::wstring(date_str, len); 445 return std::wstring(date_str, len);
446 } 446 }
OLDNEW
« no previous file with comments | « chrome/installer/util/google_chrome_distribution.cc ('k') | chrome/installer/util/installation_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698