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

Unified Diff: chrome/installer/util/install_util_unittest.cc

Issue 6288009: More installer refactoring in the interest of fixing some bugs and cleaning t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/util/install_util_unittest.cc
===================================================================
--- chrome/installer/util/install_util_unittest.cc (revision 71802)
+++ chrome/installer/util/install_util_unittest.cc (working copy)
@@ -34,17 +34,17 @@
// check results for a fresh install of single Chrome
{
TempRegKeyOverride override(root, L"root_inst_res");
- const MasterPreferences prefs(
- CommandLine::FromString(L"setup.exe --system-level"));
+ CommandLine cmd_line = CommandLine::FromString(L"setup.exe --system-level");
+ const MasterPreferences prefs(cmd_line);
InstallationState machine_state;
- machine_state.Initialize(prefs);
+ machine_state.Initialize();
InstallerState state;
- state.Initialize(prefs, machine_state);
+ state.Initialize(cmd_line, prefs, machine_state);
InstallUtil::WriteInstallerResult(system_level, state.state_key(),
installer::FIRST_INSTALL_SUCCESS, 0, &launch_cmd);
BrowserDistribution* distribution =
BrowserDistribution::GetSpecificDistribution(
- BrowserDistribution::CHROME_BROWSER, prefs);
+ BrowserDistribution::CHROME_BROWSER);
EXPECT_EQ(ERROR_SUCCESS,
key.Open(root, distribution->GetStateKey().c_str(), KEY_READ));
EXPECT_EQ(ERROR_SUCCESS,
@@ -56,18 +56,18 @@
// check results for a fresh install of multi Chrome
{
TempRegKeyOverride override(root, L"root_inst_res");
- const MasterPreferences prefs(
- CommandLine::FromString(
- L"setup.exe --system-level --multi-install --chrome"));
+ CommandLine cmd_line = CommandLine::FromString(
+ L"setup.exe --system-level --multi-install --chrome");
+ const MasterPreferences prefs(cmd_line);
InstallationState machine_state;
- machine_state.Initialize(prefs);
+ machine_state.Initialize();
InstallerState state;
- state.Initialize(prefs, machine_state);
+ state.Initialize(cmd_line, prefs, machine_state);
InstallUtil::WriteInstallerResult(system_level, state.state_key(),
installer::FIRST_INSTALL_SUCCESS, 0, &launch_cmd);
BrowserDistribution* distribution =
BrowserDistribution::GetSpecificDistribution(
- BrowserDistribution::CHROME_BROWSER, prefs);
+ BrowserDistribution::CHROME_BROWSER);
EXPECT_EQ(ERROR_SUCCESS,
key.Open(root, distribution->GetStateKey().c_str(), KEY_READ));
EXPECT_EQ(ERROR_SUCCESS,

Powered by Google App Engine
This is Rietveld 408576698