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

Unified Diff: chrome/installer/util/fake_installation_state.h

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/uninstall.cc ('k') | chrome/installer/util/google_update_settings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3f6421820c7e7aecfaed6fa3cfc8b177473753d7 100644
--- a/chrome/installer/util/fake_installation_state.h
+++ b/chrome/installer/util/fake_installation_state.h
@@ -18,39 +18,27 @@ 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)];
- target.CopyFrom(product_state);
+ void SetProductState(bool system_install, const ProductState& product_state) {
+ GetProduct(system_install)->CopyFrom(product_state);
}
protected:
- ProductState* GetProducts(bool system_install) {
- return system_install ? system_products_ : user_products_;
+ ProductState* GetProduct(bool system_install) {
+ return system_install ? &system_chrome_ : &user_chrome_;
}
};
« no previous file with comments | « chrome/installer/setup/uninstall.cc ('k') | chrome/installer/util/google_update_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698