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 #include "chrome/installer/util/installation_state.h" | 5 #include "chrome/installer/util/installation_state.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/version.h" | 10 #include "base/version.h" |
11 #include "base/win/registry.h" | 11 #include "base/win/registry.h" |
12 #include "chrome/installer/util/google_update_constants.h" | 12 #include "chrome/installer/util/google_update_constants.h" |
13 #include "chrome/installer/util/install_util.h" | 13 #include "chrome/installer/util/install_util.h" |
14 | 14 |
15 namespace installer { | 15 namespace installer { |
16 | 16 |
17 ProductState::ProductState() | 17 ProductState::ProductState() |
18 : uninstall_command_(base::CommandLine::NO_PROGRAM), | 18 : uninstall_command_(base::CommandLine::NO_PROGRAM), |
19 eula_accepted_(0), | 19 eula_accepted_(0), |
20 usagestats_(0), | 20 usagestats_(0), |
21 msi_(false), | 21 msi_(false), |
22 multi_install_(false), | 22 multi_install_(false), |
23 has_eula_accepted_(false), | 23 has_eula_accepted_(false), |
24 has_oem_install_(false), | 24 has_oem_install_(false), |
25 has_usagestats_(false) { | 25 has_usagestats_(false) { |
26 } | 26 } |
27 | 27 |
| 28 ProductState::~ProductState() { |
| 29 } |
| 30 |
28 bool ProductState::Initialize(bool system_install, | 31 bool ProductState::Initialize(bool system_install, |
29 BrowserDistribution::Type type) { | 32 BrowserDistribution::Type type) { |
30 return Initialize(system_install, | 33 return Initialize(system_install, |
31 BrowserDistribution::GetSpecificDistribution(type)); | 34 BrowserDistribution::GetSpecificDistribution(type)); |
32 } | 35 } |
33 | 36 |
34 // Initializes |commands| from the "Commands" subkey of |version_key|. | 37 // Initializes |commands| from the "Commands" subkey of |version_key|. |
35 // Returns false if there is no "Commands" subkey or on error. | 38 // Returns false if there is no "Commands" subkey or on error. |
36 // static | 39 // static |
37 bool ProductState::InitializeCommands(const base::win::RegKey& version_key, | 40 bool ProductState::InitializeCommands(const base::win::RegKey& version_key, |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 } | 264 } |
262 | 265 |
263 const ProductState* InstallationState::GetProductState( | 266 const ProductState* InstallationState::GetProductState( |
264 bool system_install, | 267 bool system_install, |
265 BrowserDistribution::Type type) const { | 268 BrowserDistribution::Type type) const { |
266 const ProductState* product_state = | 269 const ProductState* product_state = |
267 GetNonVersionedProductState(system_install, type); | 270 GetNonVersionedProductState(system_install, type); |
268 return product_state->version_.get() == NULL ? NULL : product_state; | 271 return product_state->version_.get() == NULL ? NULL : product_state; |
269 } | 272 } |
270 } // namespace installer | 273 } // namespace installer |
OLD | NEW |