| 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 // This file extends generic BrowserDistribution class to declare Google Chrome | 5 // This file extends generic BrowserDistribution class to declare Google Chrome |
| 6 // specific implementation. | 6 // specific implementation. |
| 7 | 7 |
| 8 #ifndef CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_ | 8 #ifndef CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_ |
| 9 #define CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_ | 9 #define CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_ |
| 10 | 10 |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 13 #include "chrome/installer/util/browser_distribution.h" | 13 #include "chrome/installer/util/browser_distribution.h" |
| 14 #include "chrome/installer/util/util_constants.h" | |
| 15 | 14 |
| 16 namespace base { | 15 namespace base { |
| 17 class DictionaryValue; | 16 class DictionaryValue; |
| 18 class FilePath; | 17 class FilePath; |
| 19 } | 18 } |
| 20 | 19 |
| 21 class GoogleChromeDistribution : public BrowserDistribution { | 20 class GoogleChromeDistribution : public BrowserDistribution { |
| 22 public: | 21 public: |
| 23 // Opens the Google Chrome uninstall survey window. | 22 // Opens the Google Chrome uninstall survey window. |
| 24 // version refers to the version of Chrome being uninstalled. | 23 // version refers to the version of Chrome being uninstalled. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 virtual bool GetCommandExecuteImplClsid( | 79 virtual bool GetCommandExecuteImplClsid( |
| 81 string16* handler_class_uuid) OVERRIDE; | 80 string16* handler_class_uuid) OVERRIDE; |
| 82 | 81 |
| 83 virtual bool AppHostIsSupported() OVERRIDE; | 82 virtual bool AppHostIsSupported() OVERRIDE; |
| 84 | 83 |
| 85 virtual void UpdateInstallStatus( | 84 virtual void UpdateInstallStatus( |
| 86 bool system_install, | 85 bool system_install, |
| 87 installer::ArchiveType archive_type, | 86 installer::ArchiveType archive_type, |
| 88 installer::InstallStatus install_status) OVERRIDE; | 87 installer::InstallStatus install_status) OVERRIDE; |
| 89 | 88 |
| 90 virtual bool GetExperimentDetails(UserExperiment* experiment, | |
| 91 int flavor) OVERRIDE; | |
| 92 | |
| 93 virtual void LaunchUserExperiment( | |
| 94 const base::FilePath& setup_path, | |
| 95 installer::InstallStatus status, | |
| 96 const Version& version, | |
| 97 const installer::Product& product, | |
| 98 bool system_level) OVERRIDE; | |
| 99 | |
| 100 // Assuming that the user qualifies, this function performs the inactive user | |
| 101 // toast experiment. It will use chrome to show the UI and it will record the | |
| 102 // outcome in the registry. | |
| 103 virtual void InactiveUserToastExperiment( | |
| 104 int flavor, | |
| 105 const string16& experiment_group, | |
| 106 const installer::Product& installation, | |
| 107 const base::FilePath& application_path) OVERRIDE; | |
| 108 | |
| 109 virtual bool ShouldSetExperimentLabels() OVERRIDE; | 89 virtual bool ShouldSetExperimentLabels() OVERRIDE; |
| 110 | 90 |
| 111 const string16& product_guid() { return product_guid_; } | 91 const string16& product_guid() { return product_guid_; } |
| 112 | 92 |
| 113 protected: | 93 protected: |
| 114 void set_product_guid(const string16& guid) { product_guid_ = guid; } | 94 void set_product_guid(const string16& guid) { product_guid_ = guid; } |
| 115 | 95 |
| 116 // Disallow construction from others. | 96 // Disallow construction from others. |
| 117 GoogleChromeDistribution(); | 97 GoogleChromeDistribution(); |
| 118 | 98 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 138 // Returns true if at least one uninstall metric was found in | 118 // Returns true if at least one uninstall metric was found in |
| 139 // uninstall_metrics_dict, false otherwise. | 119 // uninstall_metrics_dict, false otherwise. |
| 140 virtual bool BuildUninstallMetricsString( | 120 virtual bool BuildUninstallMetricsString( |
| 141 const base::DictionaryValue* uninstall_metrics_dict, string16* metrics); | 121 const base::DictionaryValue* uninstall_metrics_dict, string16* metrics); |
| 142 | 122 |
| 143 // The product ID for Google Update. | 123 // The product ID for Google Update. |
| 144 string16 product_guid_; | 124 string16 product_guid_; |
| 145 }; | 125 }; |
| 146 | 126 |
| 147 #endif // CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_ | 127 #endif // CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_ |
| OLD | NEW |