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

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

Issue 2618583005: Remove support for non-browser products from InstallationState and ProductState. (Closed)
Patch Set: fix 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
Index: chrome/installer/util/installation_state.h
diff --git a/chrome/installer/util/installation_state.h b/chrome/installer/util/installation_state.h
index c3f525ab6c4be50b323cdab80f2b2ef7d64cfe54..5d2e8a49ecc42a85d263cfe145e06826f79d5d6a 100644
--- a/chrome/installer/util/installation_state.h
+++ b/chrome/installer/util/installation_state.h
@@ -12,7 +12,6 @@
#include "base/files/file_path.h"
#include "base/macros.h"
#include "chrome/installer/util/app_commands.h"
-#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/channel_info.h"
namespace base {
@@ -26,9 +25,11 @@ namespace installer {
class InstallationState;
-// A representation of a product's state on the machine based on the contents
-// of the Windows registry.
+// A representation of Chrome's state on the machine based on the contents of
+// the Windows registry.
// TODO(grt): Pull this out into its own file.
+// TODO(grt): Evaluate whether this is still needed. If yes, rename to
+// ChromeState or somesuch.
class ProductState {
public:
ProductState();
@@ -36,10 +37,7 @@ class ProductState {
// Returns true if the product is installed (i.e., the product's Clients key
// exists and has a "pv" value); false otherwise.
- bool Initialize(bool system_install,
- BrowserDistribution::Type type);
- bool Initialize(bool system_install,
- BrowserDistribution* distribution);
+ bool Initialize(bool system_install);
// Returns the product's channel info (i.e., the Google Update "ap" value).
const ChannelInfo& channel() const { return channel_; }
@@ -137,8 +135,7 @@ class InstallationState {
// Returns the state of a product or NULL if not installed.
// Caller does NOT assume ownership of returned pointer.
- const ProductState* GetProductState(bool system_install,
- BrowserDistribution::Type type) const;
+ const ProductState* GetProductState(bool system_install) const;
// Returns the state of a product, even one that has not yet been installed.
// This is useful during first install, when some but not all ProductState
@@ -147,21 +144,11 @@ class InstallationState {
// the version numbers from a ProductState returned by this method.
// Caller does NOT assume ownership of returned pointer. This method will
// never return NULL.
- const ProductState* GetNonVersionedProductState(
- bool system_install, BrowserDistribution::Type type) const;
+ const ProductState* GetNonVersionedProductState(bool system_install) const;
protected:
- enum {
- CHROME_BROWSER_INDEX,
- CHROME_FRAME_INDEX,
- CHROME_BINARIES_INDEX,
- NUM_PRODUCTS
- };
-
- static int IndexFromDistType(BrowserDistribution::Type type);
-
- ProductState user_products_[NUM_PRODUCTS];
- ProductState system_products_[NUM_PRODUCTS];
+ ProductState user_chrome_;
+ ProductState system_chrome_;
private:
DISALLOW_COPY_AND_ASSIGN(InstallationState);

Powered by Google App Engine
This is Rietveld 408576698