Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 // This file declares a class that contains various method related to branding. | 5 // This file declares a class that contains various method related to branding. |
| 6 | 6 |
| 7 #ifndef CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 7 #ifndef CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
| 8 #define CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 8 #define CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| 11 #if defined(OS_WIN) | |
| 12 #include <windows.h> | |
| 13 #endif | |
| 14 | |
| 15 #include <string> | |
| 16 #include <vector> | |
|
robertshield
2010/12/01 21:40:54
why include vector?
tommi (sloooow) - chröme
2010/12/01 22:07:15
Removed. I started out supporting a vector of key
| |
| 17 | |
| 11 #include "base/basictypes.h" | 18 #include "base/basictypes.h" |
| 12 #include "base/file_path.h" | 19 #include "base/file_path.h" |
| 13 #include "chrome/installer/util/util_constants.h" | 20 #include "chrome/installer/util/util_constants.h" |
| 14 #include "chrome/installer/util/version.h" | 21 #include "chrome/installer/util/version.h" |
| 15 | 22 |
| 16 #if defined(OS_WIN) | |
| 17 #include <windows.h> | |
| 18 #endif | |
| 19 | |
| 20 namespace installer { | 23 namespace installer { |
| 21 class Product; | 24 class Product; |
| 22 } | 25 } |
| 23 | 26 |
| 24 class BrowserDistribution { | 27 class BrowserDistribution { |
| 25 public: | 28 public: |
| 26 virtual ~BrowserDistribution() {} | 29 virtual ~BrowserDistribution() {} |
| 27 | 30 |
| 28 enum DistributionType { | 31 enum DistributionType { |
| 29 CHROME_BROWSER, | 32 CHROME_BROWSER, |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 virtual void LaunchUserExperiment(installer_util::InstallStatus status, | 99 virtual void LaunchUserExperiment(installer_util::InstallStatus status, |
| 97 const installer::Version& version, | 100 const installer::Version& version, |
| 98 const installer::Product& installation, | 101 const installer::Product& installation, |
| 99 bool system_level); | 102 bool system_level); |
| 100 | 103 |
| 101 // The user has qualified for the inactive user toast experiment and this | 104 // The user has qualified for the inactive user toast experiment and this |
| 102 // function just performs it. | 105 // function just performs it. |
| 103 virtual void InactiveUserToastExperiment(int flavor, | 106 virtual void InactiveUserToastExperiment(int flavor, |
| 104 const installer::Product& installation); | 107 const installer::Product& installation); |
| 105 | 108 |
| 109 // A key-file is a file such as a DLL on Windows that is expected to be | |
| 110 // in use when the product is being used. For example "chrome.dll" for | |
| 111 // Chrome. Before attempting to delete an installation directory during | |
| 112 // an uninstallation, the uninstaller will check if any one of a potential | |
| 113 // set of key files is in use and if they are, abort the delete operation. | |
| 114 // Only if none of the key files are in use, can the folder be deleted. | |
| 115 // Note that this function does not return a full path to the key file, but | |
| 116 // only a name that's relative to the installation folder. | |
|
robertshield
2010/12/01 21:40:54
xnay on the stallationinnay olderfay.
tommi (sloooow) - chröme
2010/12/01 22:07:15
Done.
| |
| 117 virtual FilePath::StringType GetKeyFile(); | |
| 118 | |
| 106 protected: | 119 protected: |
| 107 BrowserDistribution() : type_(CHROME_BROWSER) {} | 120 BrowserDistribution() : type_(CHROME_BROWSER) {} |
| 108 | 121 |
| 109 template<class DistributionClass> | 122 template<class DistributionClass> |
| 110 static BrowserDistribution* GetOrCreateBrowserDistribution( | 123 static BrowserDistribution* GetOrCreateBrowserDistribution( |
| 111 BrowserDistribution** dist); | 124 BrowserDistribution** dist); |
| 112 | 125 |
| 113 DistributionType type_; | 126 DistributionType type_; |
| 114 | 127 |
| 115 private: | 128 private: |
| 116 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); | 129 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); |
| 117 }; | 130 }; |
| 118 | 131 |
| 119 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 132 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
| OLD | NEW |