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

Unified Diff: chrome/installer/setup/install_worker_unittest.cc

Issue 2618583005: Remove support for non-browser products from InstallationState and ProductState. (Closed)
Patch Set: sync to position 442664 Created 3 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
« no previous file with comments | « chrome/installer/setup/install.cc ('k') | chrome/installer/setup/installer_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/install_worker_unittest.cc
diff --git a/chrome/installer/setup/install_worker_unittest.cc b/chrome/installer/setup/install_worker_unittest.cc
index 4115f0985514fa3104b05fc64f6dd94996a617fe..3243588f86e8ee95be4e0192abd0c7f9fc878772 100644
--- a/chrome/installer/setup/install_worker_unittest.cc
+++ b/chrome/installer/setup/install_worker_unittest.cc
@@ -148,10 +148,8 @@ class MockInstallationState : public InstallationState {
public:
// Included for testing.
void SetProductState(bool system_install,
- BrowserDistribution::Type type,
const ProductState& product_state) {
- ProductState& target = (system_install ? system_products_ :
- user_products_)[IndexFromDistType(type)];
+ ProductState& target = system_install ? system_chrome_ : user_chrome_;
target.CopyFrom(product_state);
}
};
@@ -212,9 +210,7 @@ class InstallWorkerTest : public testing::Test {
if (system_level)
product_state.AddUninstallSwitch(installer::switches::kSystemLevel);
- installation_state->SetProductState(system_level,
- BrowserDistribution::CHROME_BROWSER,
- product_state);
+ installation_state->SetProductState(system_level, product_state);
}
MockInstallationState* BuildChromeInstallationState(bool system_level) {
@@ -245,8 +241,7 @@ class InstallWorkerTest : public testing::Test {
MockInstallerState* installer_state) {
// Fresh install or upgrade?
const ProductState* chrome =
- machine_state.GetProductState(installer_state->system_install(),
- BrowserDistribution::CHROME_BROWSER);
+ machine_state.GetProductState(installer_state->system_install());
if (chrome) {
installer_state->AddProductFromState(*chrome);
} else {
« no previous file with comments | « chrome/installer/setup/install.cc ('k') | chrome/installer/setup/installer_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698