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

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

Issue 5756007: Revert 69165 - Merge the installer, installer_util and setup_util namespaces ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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
« no previous file with comments | « chrome/installer/util/package_unittest.cc ('k') | chrome/installer/util/product.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PRODUCT_H_ 5 #ifndef CHROME_INSTALLER_UTIL_PRODUCT_H_
6 #define CHROME_INSTALLER_UTIL_PRODUCT_H_ 6 #define CHROME_INSTALLER_UTIL_PRODUCT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/ref_counted.h" 11 #include "base/ref_counted.h"
12 #include "chrome/installer/util/browser_distribution.h" 12 #include "chrome/installer/util/browser_distribution.h"
13 #include "chrome/installer/util/package.h" 13 #include "chrome/installer/util/package.h"
14 14
15 class CommandLine; 15 class CommandLine;
16 16
17 namespace installer { 17 namespace installer_util {
18 class MasterPreferences; 18 class MasterPreferences;
19 } 19 }
20 20
21 namespace installer { 21 namespace installer {
22 22
23 class Product; 23 class Product;
24 class Package; 24 class Package;
25 class Version; 25 class Version;
26 26
27 typedef std::vector<scoped_refptr<Package> > Packages; 27 typedef std::vector<scoped_refptr<Package> > Packages;
28 typedef std::vector<scoped_refptr<const Product> > Products; 28 typedef std::vector<scoped_refptr<const Product> > Products;
29 29
30 const Product* FindProduct(const Products& products, 30 const Product* FindProduct(const Products& products,
31 BrowserDistribution::Type type); 31 BrowserDistribution::Type type);
32 32
33 // Calls WriteInstallerResult for each Product object. 33 // Calls WriteInstallerResult for each Product object.
34 void WriteInstallerResult(const Products& products, 34 void WriteInstallerResult(const Products& products,
35 installer::InstallStatus status, 35 installer_util::InstallStatus status,
36 int string_resource_id, 36 int string_resource_id,
37 const std::wstring* const launch_cmd); 37 const std::wstring* const launch_cmd);
38 38
39 // Represents an installation of a specific product which has a one-to-one 39 // Represents an installation of a specific product which has a one-to-one
40 // relation to a BrowserDistribution. A product has registry settings, related 40 // relation to a BrowserDistribution. A product has registry settings, related
41 // installation/uninstallation actions and exactly one Package that represents 41 // installation/uninstallation actions and exactly one Package that represents
42 // the files on disk. The Package may be shared with other Product instances, 42 // the files on disk. The Package may be shared with other Product instances,
43 // so only the last Product to be uninstalled should remove the package. 43 // so only the last Product to be uninstalled should remove the package.
44 // Right now there are no classes that derive from Product, but in 44 // Right now there are no classes that derive from Product, but in
45 // the future, as we move away from global functions and towards a data driven 45 // the future, as we move away from global functions and towards a data driven
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // value 1 89 // value 1
90 bool IsMsi() const; 90 bool IsMsi() const;
91 91
92 // Sets the boolean MSI marker for this installation if set is true or clears 92 // Sets the boolean MSI marker for this installation if set is true or clears
93 // it otherwise. The MSI marker is stored in the registry under the 93 // it otherwise. The MSI marker is stored in the registry under the
94 // ClientState key. 94 // ClientState key.
95 bool SetMsiMarker(bool set) const; 95 bool SetMsiMarker(bool set) const;
96 96
97 // Sets installer error information in registry so that Google Update can read 97 // Sets installer error information in registry so that Google Update can read
98 // it and display to the user. 98 // it and display to the user.
99 void WriteInstallerResult(installer::InstallStatus status, 99 void WriteInstallerResult(installer_util::InstallStatus status,
100 int string_resource_id, 100 int string_resource_id,
101 const std::wstring* const launch_cmd) const; 101 const std::wstring* const launch_cmd) const;
102 102
103 // Find the version of this product installed on the system by checking the 103 // Find the version of this product installed on the system by checking the
104 // Google Update registry key. Returns the version or NULL if no version is 104 // Google Update registry key. Returns the version or NULL if no version is
105 // found. Caller must free the returned Version object. 105 // found. Caller must free the returned Version object.
106 Version* GetInstalledVersion() const; 106 Version* GetInstalledVersion() const;
107 107
108 protected: 108 protected:
109 BrowserDistribution* distribution_; 109 BrowserDistribution* distribution_;
(...skipping 22 matching lines...) Expand all
132 132
133 bool system_level() const { 133 bool system_level() const {
134 return system_level_; 134 return system_level_;
135 } 135 }
136 136
137 const Packages& packages() const; 137 const Packages& packages() const;
138 138
139 const Products& products() const; 139 const Products& products() const;
140 140
141 bool AddDistribution(BrowserDistribution::Type type, 141 bool AddDistribution(BrowserDistribution::Type type,
142 const installer::MasterPreferences& prefs); 142 const installer_util::MasterPreferences& prefs);
143 bool AddDistribution(BrowserDistribution* distribution); 143 bool AddDistribution(BrowserDistribution* distribution);
144 144
145 protected: 145 protected:
146 bool system_level_; 146 bool system_level_;
147 Packages packages_; 147 Packages packages_;
148 Products products_; 148 Products products_;
149 149
150 private: 150 private:
151 DISALLOW_COPY_AND_ASSIGN(ProductPackageMapping); 151 DISALLOW_COPY_AND_ASSIGN(ProductPackageMapping);
152 }; 152 };
153 153
154 } // namespace installer 154 } // namespace installer
155 155
156 #endif // CHROME_INSTALLER_UTIL_PRODUCT_H_ 156 #endif // CHROME_INSTALLER_UTIL_PRODUCT_H_
OLDNEW
« no previous file with comments | « chrome/installer/util/package_unittest.cc ('k') | chrome/installer/util/product.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698