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); |