OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "chrome/installer/util/app_commands.h" | 14 #include "chrome/installer/util/app_commands.h" |
15 #include "chrome/installer/util/browser_distribution.h" | 15 #include "chrome/installer/util/browser_distribution.h" |
16 #include "chrome/installer/util/channel_info.h" | 16 #include "chrome/installer/util/channel_info.h" |
17 | 17 |
| 18 namespace base { |
18 class Version; | 19 class Version; |
19 | |
20 namespace base { | |
21 namespace win { | 20 namespace win { |
22 class RegKey; | 21 class RegKey; |
23 } | 22 } |
24 } | 23 } |
25 | 24 |
26 namespace installer { | 25 namespace installer { |
27 | 26 |
28 class InstallationState; | 27 class InstallationState; |
29 | 28 |
30 // A representation of a product's state on the machine based on the contents | 29 // A representation of a product's state on the machine based on the contents |
(...skipping 11 matching lines...) Expand all Loading... |
42 BrowserDistribution* distribution); | 41 BrowserDistribution* distribution); |
43 | 42 |
44 // Returns the product's channel info (i.e., the Google Update "ap" value). | 43 // Returns the product's channel info (i.e., the Google Update "ap" value). |
45 const ChannelInfo& channel() const { return channel_; } | 44 const ChannelInfo& channel() const { return channel_; } |
46 | 45 |
47 // Returns the path to the product's "setup.exe"; may be empty. | 46 // Returns the path to the product's "setup.exe"; may be empty. |
48 base::FilePath GetSetupPath() const; | 47 base::FilePath GetSetupPath() const; |
49 | 48 |
50 // Returns the product's version. This method may only be called on an | 49 // Returns the product's version. This method may only be called on an |
51 // instance that has been initialized for an installed product. | 50 // instance that has been initialized for an installed product. |
52 const Version& version() const; | 51 const base::Version& version() const; |
53 | 52 |
54 // Returns the current version of the product if a new version is awaiting | 53 // Returns the current version of the product if a new version is awaiting |
55 // update; may be NULL. Ownership of a returned value is not passed to the | 54 // update; may be NULL. Ownership of a returned value is not passed to the |
56 // caller. | 55 // caller. |
57 const Version* old_version() const { return old_version_.get(); } | 56 const base::Version* old_version() const { return old_version_.get(); } |
58 | 57 |
59 // Returns the brand code the product is currently installed with. | 58 // Returns the brand code the product is currently installed with. |
60 const std::wstring& brand() const { return brand_; } | 59 const std::wstring& brand() const { return brand_; } |
61 | 60 |
62 // Returns the command to be used to update to the new version that is | 61 // Returns the command to be used to update to the new version that is |
63 // awaiting update; may be empty. | 62 // awaiting update; may be empty. |
64 const std::wstring& rename_cmd() const { return rename_cmd_; } | 63 const std::wstring& rename_cmd() const { return rename_cmd_; } |
65 | 64 |
66 // Returns true and populates |eula_accepted| if the product has such a value; | 65 // Returns true and populates |eula_accepted| if the product has such a value; |
67 // otherwise, returns false and does not modify |eula_accepted|. Expected | 66 // otherwise, returns false and does not modify |eula_accepted|. Expected |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 ProductState user_products_[NUM_PRODUCTS]; | 161 ProductState user_products_[NUM_PRODUCTS]; |
163 ProductState system_products_[NUM_PRODUCTS]; | 162 ProductState system_products_[NUM_PRODUCTS]; |
164 | 163 |
165 private: | 164 private: |
166 DISALLOW_COPY_AND_ASSIGN(InstallationState); | 165 DISALLOW_COPY_AND_ASSIGN(InstallationState); |
167 }; // class InstallationState | 166 }; // class InstallationState |
168 | 167 |
169 } // namespace installer | 168 } // namespace installer |
170 | 169 |
171 #endif // CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_ | 170 #endif // CHROME_INSTALLER_UTIL_INSTALLATION_STATE_H_ |
OLD | NEW |