OLD | NEW |
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 #include <map> | 5 #include <map> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 Level install_level, | 203 Level install_level, |
204 const char* version, | 204 const char* version, |
205 int channel_modifiers) { | 205 int channel_modifiers) { |
206 DCHECK_EQ(dist_type, BrowserDistribution::CHROME_BINARIES); | 206 DCHECK_EQ(dist_type, BrowserDistribution::CHROME_BINARIES); |
207 DCHECK_NE(channel_modifiers & CM_MULTI, 0); | 207 DCHECK_NE(channel_modifiers & CM_MULTI, 0); |
208 | 208 |
209 CommandLine cmd_line(GetSetupExePath(dist_type, install_level, version, | 209 CommandLine cmd_line(GetSetupExePath(dist_type, install_level, version, |
210 channel_modifiers)); | 210 channel_modifiers)); |
211 cmd_line.AppendSwitch(installer::switches::kMultiInstall); | 211 cmd_line.AppendSwitch(installer::switches::kMultiInstall); |
212 cmd_line.AppendSwitch(installer::switches::kChromeAppHost); | 212 cmd_line.AppendSwitch(installer::switches::kChromeAppHost); |
213 commands_.Set(installer::kCmdQuickEnableApplicationHost, | 213 AppCommand app_cmd(cmd_line.GetCommandLineString()); |
214 AppCommand(cmd_line.GetCommandLineString(), true, true)); | 214 app_cmd.set_sends_pings(true); |
| 215 app_cmd.set_is_web_accessible(true); |
| 216 commands_.Set(installer::kCmdQuickEnableApplicationHost, app_cmd); |
215 } | 217 } |
216 | 218 |
217 // Adds the "quick-enable-cf" Google Update product command. | 219 // Adds the "quick-enable-cf" Google Update product command. |
218 void FakeProductState::AddQuickEnableCfCommand( | 220 void FakeProductState::AddQuickEnableCfCommand( |
219 BrowserDistribution::Type dist_type, | 221 BrowserDistribution::Type dist_type, |
220 Level install_level, | 222 Level install_level, |
221 const char* version, | 223 const char* version, |
222 int channel_modifiers) { | 224 int channel_modifiers) { |
223 DCHECK_EQ(dist_type, BrowserDistribution::CHROME_BINARIES); | 225 DCHECK_EQ(dist_type, BrowserDistribution::CHROME_BINARIES); |
224 DCHECK_NE(channel_modifiers & CM_MULTI, 0); | 226 DCHECK_NE(channel_modifiers & CM_MULTI, 0); |
225 | 227 |
226 CommandLine cmd_line(GetSetupExePath(dist_type, install_level, version, | 228 CommandLine cmd_line(GetSetupExePath(dist_type, install_level, version, |
227 channel_modifiers)); | 229 channel_modifiers)); |
228 cmd_line.AppendSwitch(installer::switches::kMultiInstall); | 230 cmd_line.AppendSwitch(installer::switches::kMultiInstall); |
229 if (install_level == SYSTEM_LEVEL) | 231 if (install_level == SYSTEM_LEVEL) |
230 cmd_line.AppendSwitch(installer::switches::kSystemLevel); | 232 cmd_line.AppendSwitch(installer::switches::kSystemLevel); |
231 cmd_line.AppendSwitch(installer::switches::kChromeFrameQuickEnable); | 233 cmd_line.AppendSwitch(installer::switches::kChromeFrameQuickEnable); |
232 commands_.Set(installer::kCmdQuickEnableCf, | 234 AppCommand app_cmd(cmd_line.GetCommandLineString()); |
233 AppCommand(cmd_line.GetCommandLineString(), true, true)); | 235 app_cmd.set_sends_pings(true); |
| 236 app_cmd.set_is_web_accessible(true); |
| 237 commands_.Set(installer::kCmdQuickEnableCf, app_cmd); |
234 } | 238 } |
235 | 239 |
236 } // namespace | 240 } // namespace |
237 | 241 |
238 // Fixture for testing the InstallationValidator. Errors logged by the | 242 // Fixture for testing the InstallationValidator. Errors logged by the |
239 // validator are sent to an optional mock recipient (see | 243 // validator are sent to an optional mock recipient (see |
240 // set_validation_error_recipient) upon which expectations can be placed. | 244 // set_validation_error_recipient) upon which expectations can be placed. |
241 class InstallationValidatorTest | 245 class InstallationValidatorTest |
242 : public testing::TestWithParam<InstallationValidator::InstallationType> { | 246 : public testing::TestWithParam<InstallationValidator::InstallationType> { |
243 public: | 247 public: |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 InstallationValidatorTest, | 508 InstallationValidatorTest, |
505 Values(InstallationValidator::NO_PRODUCTS, | 509 Values(InstallationValidator::NO_PRODUCTS, |
506 InstallationValidator::CHROME_SINGLE, | 510 InstallationValidator::CHROME_SINGLE, |
507 InstallationValidator::CHROME_MULTI, | 511 InstallationValidator::CHROME_MULTI, |
508 InstallationValidator::CHROME_FRAME_SINGLE, | 512 InstallationValidator::CHROME_FRAME_SINGLE, |
509 InstallationValidator::CHROME_FRAME_SINGLE_CHROME_SINGLE, | 513 InstallationValidator::CHROME_FRAME_SINGLE_CHROME_SINGLE, |
510 InstallationValidator::CHROME_FRAME_SINGLE_CHROME_MULTI, | 514 InstallationValidator::CHROME_FRAME_SINGLE_CHROME_MULTI, |
511 InstallationValidator::CHROME_FRAME_MULTI, | 515 InstallationValidator::CHROME_FRAME_MULTI, |
512 InstallationValidator::CHROME_FRAME_MULTI_CHROME_MULTI, | 516 InstallationValidator::CHROME_FRAME_MULTI_CHROME_MULTI, |
513 InstallationValidator::CHROME_FRAME_READY_MODE_CHROME_MULTI)); | 517 InstallationValidator::CHROME_FRAME_READY_MODE_CHROME_MULTI)); |
OLD | NEW |