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

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

Issue 731373002: Enable MSVC warning for unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another Windows fix Created 6 years, 1 month 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
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/installer_state_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) 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 // 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 11 matching lines...) Expand all
22 namespace installer { 22 namespace installer {
23 23
24 BrowserDistribution::Type 24 BrowserDistribution::Type
25 InstallationValidator::ChromeRules::distribution_type() const { 25 InstallationValidator::ChromeRules::distribution_type() const {
26 return BrowserDistribution::CHROME_BROWSER; 26 return BrowserDistribution::CHROME_BROWSER;
27 } 27 }
28 28
29 void InstallationValidator::ChromeRules::AddUninstallSwitchExpectations( 29 void InstallationValidator::ChromeRules::AddUninstallSwitchExpectations(
30 const ProductContext& ctx, 30 const ProductContext& ctx,
31 SwitchExpectations* expectations) const { 31 SwitchExpectations* expectations) const {
32 const bool is_multi_install =
33 ctx.state.uninstall_command().HasSwitch(switches::kMultiInstall);
34
35 // --chrome should be present for uninstall iff --multi-install. This wasn't 32 // --chrome should be present for uninstall iff --multi-install. This wasn't
36 // the case in Chrome 10 (between r68996 and r72497), though, so consider it 33 // the case in Chrome 10 (between r68996 and r72497), though, so consider it
37 // optional. 34 // optional.
38 } 35 }
39 36
40 void InstallationValidator::ChromeRules::AddRenameSwitchExpectations( 37 void InstallationValidator::ChromeRules::AddRenameSwitchExpectations(
41 const ProductContext& ctx, 38 const ProductContext& ctx,
42 SwitchExpectations* expectations) const { 39 SwitchExpectations* expectations) const {
43 const bool is_multi_install =
44 ctx.state.uninstall_command().HasSwitch(switches::kMultiInstall);
45
46 // --chrome should not be present for rename. It was for a time, so we'll be 40 // --chrome should not be present for rename. It was for a time, so we'll be
47 // lenient so that mini_installer tests pass. 41 // lenient so that mini_installer tests pass.
48 42
49 // --chrome-frame should never be present. 43 // --chrome-frame should never be present.
50 expectations->push_back( 44 expectations->push_back(
51 std::make_pair(std::string(switches::kChromeFrame), false)); 45 std::make_pair(std::string(switches::kChromeFrame), false));
52 } 46 }
53 47
54 bool InstallationValidator::ChromeRules::UsageStatsAllowed( 48 bool InstallationValidator::ChromeRules::UsageStatsAllowed(
55 const ProductContext& ctx) const { 49 const ProductContext& ctx) const {
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 InstallationType* type) { 746 InstallationType* type) {
753 DCHECK(type); 747 DCHECK(type);
754 InstallationState machine_state; 748 InstallationState machine_state;
755 749
756 machine_state.Initialize(); 750 machine_state.Initialize();
757 751
758 return ValidateInstallationTypeForState(machine_state, system_level, type); 752 return ValidateInstallationTypeForState(machine_state, system_level, type);
759 } 753 }
760 754
761 } // namespace installer 755 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/installer_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698