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

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

Issue 1214163008: Bump os-upgrade component of Active Setup version on-os-upgrade. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@active_setup_onosup_fixversion_forreal
Patch Set: partial review:grt Created 5 years, 6 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_worker.cc ('k') | chrome/installer/util/install_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/install_util.h
diff --git a/chrome/installer/util/install_util.h b/chrome/installer/util/install_util.h
index 5a2696747a82736a8d49138774e3647a49f12e4f..616b27a220e1c452f401717170ea8396a44be461 100644
--- a/chrome/installer/util/install_util.h
+++ b/chrome/installer/util/install_util.h
@@ -32,6 +32,43 @@ class Version;
// independently.
class InstallUtil {
public:
+ // The components of the Active Setup Version entry, in order.
+ enum ActiveSetupVersionComponent {
+ // The major version.
+ MAJOR,
+ // Unused component, always 0 for now.
+ UNUSED1,
+ // Number of OS upgrades handled since original install.
+ OS_UPGRADES,
+ // Unused component, always 0 for now.
+ UNUSED2,
+ };
+
+ // The set of operations that can be performed on an
+ // ActiveSetupVersionComponent.
+ enum ActiveSetupVersionOperation {
+ // Sets the ActiveSetupVersionComponent operated on to the value specified.
+ SET,
+ // Bumps the ActiveSetupVersionComponent operated on by the value specified.
+ BUMP,
+ };
+
+ // Returns the updated Active Setup version once |operation|+|value| is
+ // applied to |component| of |existing_version|.
+ static base::string16 GetActiveSetupVersionFromExisting(
+ ActiveSetupVersionComponent component,
+ ActiveSetupVersionOperation operation,
+ int value,
+ const base::string16& existing_version);
+
+ // Updates the Active Setup version for |dist| as dictated by |component|,
+ // |operation|, and |value|. Requires an Active Setup version to already be
+ // installed for |dist|. Returns true on success.
+ static bool UpdateActiveSetupVersion(BrowserDistribution* dist,
+ ActiveSetupVersionComponent component,
+ ActiveSetupVersionOperation operation,
+ int value);
+
// Get the path to this distribution's Active Setup registry entries.
// e.g. Software\Microsoft\Active Setup\Installed Components\<dist_guid>
static base::string16 GetActiveSetupPath(BrowserDistribution* dist);
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | chrome/installer/util/install_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698