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

Unified Diff: chrome/install_static/install_details.h

Issue 2459583002: Use InstallDetails in setup. (Closed)
Patch Set: another doc comment Created 3 years, 10 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/install_static/install_constants.h ('k') | chrome/install_static/install_modes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/install_static/install_details.h
diff --git a/chrome/install_static/install_details.h b/chrome/install_static/install_details.h
index 1a0a32936962ce308f460e3e65b6f5e2bc57128f..c712bf07bb7775d5a693f5a7c4a2adc8264775e3 100644
--- a/chrome/install_static/install_details.h
+++ b/chrome/install_static/install_details.h
@@ -65,12 +65,20 @@ class InstallDetails {
// a brand-specific InstallConstantIndex enumerator.
int install_mode_index() const { return payload_->mode->index; }
+ // Returns true if the current mode is the brand's primary install mode rather
+ // than one of its secondary modes (e.g., canary Chrome).
+ bool is_primary_mode() const { return install_mode_index() == 0; }
+
// The mode's install suffix (e.g., " SxS" for canary Chrome), or an empty
// string for a brand's primary install mode.
const wchar_t* install_suffix() const {
return payload_->mode->install_suffix;
}
+ // The mode's logo suffix (e.g., "Canary" for canary Chrome), or an empty
+ // string for a brand's primary install mode.
+ const wchar_t* logo_suffix() const { return payload_->mode->logo_suffix; }
+
// Returns the full name of the installed product (e.g. "Chrome SxS" for
// canary chrome).
std::wstring install_full_name() const {
@@ -89,7 +97,9 @@ class InstallDetails {
return payload_->mode->supports_system_level;
}
- // True if the mode once supported multi-install.
+ // True if the mode once supported multi-install, a legacy mode of
+ // installation. This exists to provide migration and cleanup for older
+ // installs.
bool supported_multi_install() const {
return payload_->mode->supported_multi_install;
}
« no previous file with comments | « chrome/install_static/install_constants.h ('k') | chrome/install_static/install_modes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698