| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PACKAGE_PROPERTIES_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_PACKAGE_PROPERTIES_H_ |
| 6 #define CHROME_INSTALLER_UTIL_PACKAGE_PROPERTIES_H_ | 6 #define CHROME_INSTALLER_UTIL_PACKAGE_PROPERTIES_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 29 public: | 29 public: |
| 30 PackageProperties() {} | 30 PackageProperties() {} |
| 31 virtual ~PackageProperties() {} | 31 virtual ~PackageProperties() {} |
| 32 | 32 |
| 33 static const char kPackageProductName[]; | 33 static const char kPackageProductName[]; |
| 34 | 34 |
| 35 // Returns true iff this package will be updated by Google Update. | 35 // Returns true iff this package will be updated by Google Update. |
| 36 virtual bool ReceivesUpdates() const = 0; | 36 virtual bool ReceivesUpdates() const = 0; |
| 37 | 37 |
| 38 // Equivalent to BrowserDistribution::GetAppGuid() | 38 // Equivalent to BrowserDistribution::GetAppGuid() |
| 39 virtual const std::wstring& GetAppGuid() = 0; |
| 39 virtual const std::wstring& GetStateKey() = 0; | 40 virtual const std::wstring& GetStateKey() = 0; |
| 40 virtual const std::wstring& GetStateMediumKey() = 0; | 41 virtual const std::wstring& GetStateMediumKey() = 0; |
| 41 virtual const std::wstring& GetVersionKey() = 0; | 42 virtual const std::wstring& GetVersionKey() = 0; |
| 42 virtual void UpdateInstallStatus(bool system_level, bool incremental_install, | 43 virtual void UpdateInstallStatus(bool system_level, bool incremental_install, |
| 43 bool multi_install, installer::InstallStatus status) = 0; | 44 bool multi_install, installer::InstallStatus status) = 0; |
| 44 | 45 |
| 45 private: | 46 private: |
| 46 DISALLOW_COPY_AND_ASSIGN(PackageProperties); | 47 DISALLOW_COPY_AND_ASSIGN(PackageProperties); |
| 47 }; // class PackageProperties | 48 }; // class PackageProperties |
| 48 | 49 |
| 49 class PackagePropertiesImpl : public PackageProperties { | 50 class PackagePropertiesImpl : public PackageProperties { |
| 50 public: | 51 public: |
| 51 explicit PackagePropertiesImpl(const wchar_t* guid, | 52 explicit PackagePropertiesImpl(const wchar_t* guid, |
| 52 const std::wstring& state_key, | 53 const std::wstring& state_key, |
| 53 const std::wstring& state_medium_key, | 54 const std::wstring& state_medium_key, |
| 54 const std::wstring& version_key); | 55 const std::wstring& version_key); |
| 55 virtual ~PackagePropertiesImpl(); | 56 virtual ~PackagePropertiesImpl(); |
| 56 | 57 |
| 58 virtual const std::wstring& GetAppGuid(); |
| 57 virtual const std::wstring& GetStateKey(); | 59 virtual const std::wstring& GetStateKey(); |
| 58 virtual const std::wstring& GetStateMediumKey(); | 60 virtual const std::wstring& GetStateMediumKey(); |
| 59 virtual const std::wstring& GetVersionKey(); | 61 virtual const std::wstring& GetVersionKey(); |
| 60 virtual void UpdateInstallStatus(bool system_level, bool incremental_install, | 62 virtual void UpdateInstallStatus(bool system_level, bool incremental_install, |
| 61 bool multi_install, installer::InstallStatus status); | 63 bool multi_install, installer::InstallStatus status); |
| 62 | 64 |
| 63 protected: | 65 protected: |
| 64 std::wstring guid_; | 66 std::wstring guid_; |
| 65 std::wstring state_key_; | 67 std::wstring state_key_; |
| 66 std::wstring state_medium_key_; | 68 std::wstring state_medium_key_; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 100 |
| 99 #if defined(GOOGLE_CHROME_BUILD) | 101 #if defined(GOOGLE_CHROME_BUILD) |
| 100 typedef ChromePackageProperties ActivePackageProperties; | 102 typedef ChromePackageProperties ActivePackageProperties; |
| 101 #else | 103 #else |
| 102 typedef ChromiumPackageProperties ActivePackageProperties; | 104 typedef ChromiumPackageProperties ActivePackageProperties; |
| 103 #endif | 105 #endif |
| 104 | 106 |
| 105 } // namespace installer | 107 } // namespace installer |
| 106 | 108 |
| 107 #endif // CHROME_INSTALLER_UTIL_PACKAGE_PROPERTIES_H_ | 109 #endif // CHROME_INSTALLER_UTIL_PACKAGE_PROPERTIES_H_ |
| OLD | NEW |