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

Side by Side Diff: chrome/installer/util/installation_state.h

Issue 6153003: Refactor install.cc into the work item parts and the non-work item parts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_ 5 #ifndef CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_
6 #define CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_ 6 #define CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // Encapsulates the state of all products on the system. 48 // Encapsulates the state of all products on the system.
49 class InstallationState { 49 class InstallationState {
50 public: 50 public:
51 InstallationState(); 51 InstallationState();
52 52
53 // Initializes |this| with the machine's current state. 53 // Initializes |this| with the machine's current state.
54 void Initialize(const MasterPreferences& prefs); 54 void Initialize(const MasterPreferences& prefs);
55 55
56 // Returns the state of the multi-installer package or NULL if no 56 // Returns the state of the multi-installer package or NULL if no
57 // multi-install products are installed. 57 // multi-install products are installed.
58 // Caller does NOT assume ownership of returned pointer.
tommi (sloooow) - chröme 2011/01/12 19:02:49 since the returned pointer is const, I presume you
grt (UTC plus 2) 2011/01/12 19:23:57 C++-03 5.3.5.2: Note: a pointer to a const type ca
robertshield 2011/01/13 17:06:32 Done.
robertshield 2011/01/13 17:06:32 What Greg said ;-)
58 const ProductState* GetMultiPackageState(bool system_install) const; 59 const ProductState* GetMultiPackageState(bool system_install) const;
59 60
60 // Sets the state of the multi-installer package; intended for tests.
61 void SetMultiPackageState(bool system_install,
62 const ProductState& package_state);
63
64 // Returns the state of a product or NULL if not installed. 61 // Returns the state of a product or NULL if not installed.
62 // Caller does NOT assume ownership of returned pointer.
tommi (sloooow) - chröme 2011/01/12 19:02:49 same here
robertshield 2011/01/13 17:06:32 Done.
65 const ProductState* GetProductState(bool system_install, 63 const ProductState* GetProductState(bool system_install,
66 BrowserDistribution::Type type) const; 64 BrowserDistribution::Type type) const;
67 65
68 // Sets the state of a product; indended for tests. 66 protected:
69 void SetProductState(bool system_install,
70 BrowserDistribution::Type type,
71 const ProductState& product_state);
72
73 private:
74 enum { 67 enum {
75 CHROME_BROWSER_INDEX, 68 CHROME_BROWSER_INDEX,
76 CHROME_FRAME_INDEX, 69 CHROME_FRAME_INDEX,
77 MULTI_PACKAGE_INDEX, 70 MULTI_PACKAGE_INDEX,
78 NUM_PRODUCTS 71 NUM_PRODUCTS
79 }; 72 };
80 73
81 static int IndexFromDistType(BrowserDistribution::Type type); 74 static int IndexFromDistType(BrowserDistribution::Type type);
82 static void InitializeProduct(bool system_install, 75 static void InitializeProduct(bool system_install,
83 BrowserDistribution* distribution, 76 BrowserDistribution* distribution,
84 ProductState* product); 77 ProductState* product);
85 static void InitializeMultiPackage(bool system_install, 78 static void InitializeMultiPackage(bool system_install,
86 PackageProperties& properties, 79 PackageProperties& properties,
87 ProductState* product); 80 ProductState* product);
88 81
89 ProductState user_products_[NUM_PRODUCTS]; 82 ProductState user_products_[NUM_PRODUCTS];
90 ProductState system_products_[NUM_PRODUCTS]; 83 ProductState system_products_[NUM_PRODUCTS];
91 84
grt (UTC plus 2) 2011/01/12 16:18:02 private:
robertshield 2011/01/13 17:06:32 oops, done, thanks :-)
92 DISALLOW_COPY_AND_ASSIGN(InstallationState); 85 DISALLOW_COPY_AND_ASSIGN(InstallationState);
93 }; // class InstallationState 86 }; // class InstallationState
94 87
95 } // namespace installer 88 } // namespace installer
96 89
97 #endif // CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_ 90 #endif // CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698