Index: chrome/installer/util/fake_installation_state.h |
diff --git a/chrome/installer/util/fake_installation_state.h b/chrome/installer/util/fake_installation_state.h |
index 7c5858776f2ee6d4ff024ec3e5964329c1c37012..a230c46291c5da15e988f7f19f1a5347d08f5f40 100644 |
--- a/chrome/installer/util/fake_installation_state.h |
+++ b/chrome/installer/util/fake_installation_state.h |
@@ -18,39 +18,28 @@ namespace installer { |
class FakeInstallationState : public InstallationState { |
public: |
// Takes ownership of |version|. |
- void AddChrome(bool system_install, bool multi_install, |
- base::Version* version) { |
+ void AddChrome(bool system_install, base::Version* version) { |
FakeProductState chrome_state; |
chrome_state.set_version(version); |
- chrome_state.set_multi_install(multi_install); |
- base::FilePath setup_exe( |
- GetChromeInstallPath(system_install, |
- BrowserDistribution::GetSpecificDistribution( |
- BrowserDistribution::CHROME_BROWSER))); |
+ base::FilePath setup_exe(GetChromeInstallPath( |
+ system_install, BrowserDistribution::GetDistribution())); |
setup_exe = setup_exe |
.AppendASCII(version->GetString()) |
.Append(kInstallerDir) |
.Append(kSetupExe); |
chrome_state.SetUninstallProgram(setup_exe); |
chrome_state.AddUninstallSwitch(switches::kUninstall); |
- if (multi_install) { |
- chrome_state.AddUninstallSwitch(switches::kMultiInstall); |
- chrome_state.AddUninstallSwitch(switches::kChrome); |
- } |
- SetProductState(system_install, BrowserDistribution::CHROME_BROWSER, |
- chrome_state); |
+ SetProductState(system_install, chrome_state); |
} |
- void SetProductState(bool system_install, |
- BrowserDistribution::Type type, |
- const ProductState& product_state) { |
- ProductState& target = GetProducts(system_install)[IndexFromDistType(type)]; |
+ void SetProductState(bool system_install, const ProductState& product_state) { |
+ ProductState& target = GetProduct(system_install); |
huangs
2017/01/09 09:09:10
May as well combine into 1 line.
grt (UTC plus 2)
2017/01/09 10:11:45
Done.
|
target.CopyFrom(product_state); |
} |
protected: |
- ProductState* GetProducts(bool system_install) { |
- return system_install ? system_products_ : user_products_; |
+ ProductState& GetProduct(bool system_install) { |
huangs
2017/01/09 09:09:10
For mutation, I think style requires ProductState*
grt (UTC plus 2)
2017/01/09 10:11:45
Done.
|
+ return system_install ? system_chrome_ : user_chrome_; |
} |
}; |