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

Side by Side Diff: chrome/installer/util/installation_validator.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 // Implementation of the installation validator. 5 // Implementation of the installation validator.
6 6
7 #include "chrome/installer/util/installation_validator.h" 7 #include "chrome/installer/util/installation_validator.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 bool* is_valid) { 383 bool* is_valid) {
384 for (SwitchExpectations::size_type i = 0, size = expected.size(); i < size; 384 for (SwitchExpectations::size_type i = 0, size = expected.size(); i < size;
385 ++i) { 385 ++i) {
386 const SwitchExpectations::value_type& expectation = expected[i]; 386 const SwitchExpectations::value_type& expectation = expected[i];
387 if (command.HasSwitch(expectation.first) != expectation.second) { 387 if (command.HasSwitch(expectation.first) != expectation.second) {
388 *is_valid = false; 388 *is_valid = false;
389 LOG(ERROR) << ctx.dist->GetAppShortCutName() << " " << source 389 LOG(ERROR) << ctx.dist->GetAppShortCutName() << " " << source
390 << (expectation.second ? " is missing" : " has") << " \"" 390 << (expectation.second ? " is missing" : " has") << " \""
391 << expectation.first << "\"" 391 << expectation.first << "\""
392 << (expectation.second ? "" : " but shouldn't") << ": " 392 << (expectation.second ? "" : " but shouldn't") << ": "
393 << command.command_line_string(); 393 << command.GetCommandLineString();
394 } 394 }
395 } 395 }
396 } 396 }
397 397
398 // Validates that |command|, originating from |source|, is formed properly for 398 // Validates that |command|, originating from |source|, is formed properly for
399 // the product described by |ctx| 399 // the product described by |ctx|
400 void InstallationValidator::ValidateUninstallCommand(const ProductContext& ctx, 400 void InstallationValidator::ValidateUninstallCommand(const ProductContext& ctx,
401 const CommandLine& command, 401 const CommandLine& command,
402 const char* source, 402 const char* source,
403 bool* is_valid) { 403 bool* is_valid) {
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 InstallationType* type) { 623 InstallationType* type) {
624 DCHECK(type); 624 DCHECK(type);
625 InstallationState machine_state; 625 InstallationState machine_state;
626 626
627 machine_state.Initialize(); 627 machine_state.Initialize();
628 628
629 return ValidateInstallationTypeForState(machine_state, system_level, type); 629 return ValidateInstallationTypeForState(machine_state, system_level, type);
630 } 630 }
631 631
632 } // namespace installer 632 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/install_util.cc ('k') | chrome/installer/util/installation_validator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698