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 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 #pragma once | 10 #pragma once |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // key returned by GetVersionKey() is deleted. | 59 // key returned by GetVersionKey() is deleted. |
60 virtual std::wstring GetDistributionData(HKEY root_key); | 60 virtual std::wstring GetDistributionData(HKEY root_key); |
61 | 61 |
62 virtual std::wstring GetUninstallLinkName(); | 62 virtual std::wstring GetUninstallLinkName(); |
63 | 63 |
64 virtual std::wstring GetUninstallRegPath(); | 64 virtual std::wstring GetUninstallRegPath(); |
65 | 65 |
66 virtual std::wstring GetVersionKey(); | 66 virtual std::wstring GetVersionKey(); |
67 | 67 |
68 virtual void UpdateDiffInstallStatus(bool system_install, | 68 virtual void UpdateDiffInstallStatus(bool system_install, |
69 bool incremental_install, installer_util::InstallStatus install_status); | 69 bool incremental_install, installer::InstallStatus install_status); |
70 | 70 |
71 virtual void LaunchUserExperiment(installer_util::InstallStatus status, | 71 virtual void LaunchUserExperiment(installer::InstallStatus status, |
72 const installer::Version& version, | 72 const installer::Version& version, |
73 const installer::Product& installation, | 73 const installer::Product& installation, |
74 bool system_level); | 74 bool system_level); |
75 | 75 |
76 // Assuming that the user qualifies, this function performs the inactive user | 76 // Assuming that the user qualifies, this function performs the inactive user |
77 // toast experiment. It will use chrome to show the UI and it will record the | 77 // toast experiment. It will use chrome to show the UI and it will record the |
78 // outcome in the registry. | 78 // outcome in the registry. |
79 virtual void InactiveUserToastExperiment(int flavor, | 79 virtual void InactiveUserToastExperiment(int flavor, |
80 const installer::Product& installation); | 80 const installer::Product& installation); |
81 | 81 |
82 std::wstring product_guid() { return product_guid_; } | 82 std::wstring product_guid() { return product_guid_; } |
83 | 83 |
84 protected: | 84 protected: |
85 void set_product_guid(std::wstring guid) { product_guid_ = guid; } | 85 void set_product_guid(std::wstring guid) { product_guid_ = guid; } |
86 | 86 |
87 // Disallow construction from others. | 87 // Disallow construction from others. |
88 explicit GoogleChromeDistribution( | 88 explicit GoogleChromeDistribution( |
89 const installer_util::MasterPreferences& prefs); | 89 const installer::MasterPreferences& prefs); |
90 | 90 |
91 private: | 91 private: |
92 friend class BrowserDistribution; | 92 friend class BrowserDistribution; |
93 | 93 |
94 FRIEND_TEST_ALL_PREFIXES(GoogleChromeDistTest, TestExtractUninstallMetrics); | 94 FRIEND_TEST_ALL_PREFIXES(GoogleChromeDistTest, TestExtractUninstallMetrics); |
95 | 95 |
96 // Extracts uninstall metrics from the JSON file located at file_path. | 96 // Extracts uninstall metrics from the JSON file located at file_path. |
97 // Returns them in a form suitable for appending to a url that already | 97 // Returns them in a form suitable for appending to a url that already |
98 // has GET parameters, i.e. &metric1=foo&metric2=bar. | 98 // has GET parameters, i.e. &metric1=foo&metric2=bar. |
99 // Returns true if uninstall_metrics has been successfully populated with | 99 // Returns true if uninstall_metrics has been successfully populated with |
(...skipping 10 matching lines...) Expand all Loading... |
110 // Returns true if at least one uninstall metric was found in | 110 // Returns true if at least one uninstall metric was found in |
111 // uninstall_metrics_dict, false otherwise. | 111 // uninstall_metrics_dict, false otherwise. |
112 virtual bool BuildUninstallMetricsString( | 112 virtual bool BuildUninstallMetricsString( |
113 DictionaryValue* uninstall_metrics_dict, std::wstring* metrics); | 113 DictionaryValue* uninstall_metrics_dict, std::wstring* metrics); |
114 | 114 |
115 // The product ID for Google Update. | 115 // The product ID for Google Update. |
116 std::wstring product_guid_; | 116 std::wstring product_guid_; |
117 }; | 117 }; |
118 | 118 |
119 #endif // CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_ | 119 #endif // CHROME_INSTALLER_UTIL_GOOGLE_CHROME_DISTRIBUTION_H_ |
OLD | NEW |