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 #ifndef CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ |
6 #define CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ | 6 #define CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 // crash dumps to Google. This information is collected by the web server | 79 // crash dumps to Google. This information is collected by the web server |
80 // used to download the chrome installer. | 80 // used to download the chrome installer. |
81 static bool GetCollectStatsConsentAtLevel(bool system_install); | 81 static bool GetCollectStatsConsentAtLevel(bool system_install); |
82 | 82 |
83 // Sets the user consent to send UMA and crash dumps to Google. Returns | 83 // Sets the user consent to send UMA and crash dumps to Google. Returns |
84 // false if the setting could not be recorded. | 84 // false if the setting could not be recorded. |
85 static bool SetCollectStatsConsentAtLevel(bool system_install, | 85 static bool SetCollectStatsConsentAtLevel(bool system_install, |
86 bool consented); | 86 bool consented); |
87 #endif | 87 #endif |
88 | 88 |
89 // Returns the metrics client-id backed up in the registry. If none found, | 89 // Returns the metrics info backed up in the registry. Only non-null |
90 // returns empty string. | 90 // parameters will be retrieved. Returns false on retrieval failure for |
91 static bool RetrieveMetricsID(std::string* metrics_id); | 91 // |metrics_id| (|installation_date| is not considered critical and is simply |
92 // set to 0 on retrieval failure). | |
93 static bool RetrieveMetricsInfo(std::string* metrics_id, | |
94 int64* installation_date); | |
92 | 95 |
93 // Saves a backup of the metrics client-id in the registry. | 96 // Saves a backup of the metrics client-id in the registry. |
94 static bool SaveMetricsID(const std::string& metrics_id); | 97 static bool SaveMetricsInfo(const std::string& metrics_id, |
98 const int64 installation_date); | |
Ilya Sherman
2014/07/08 01:10:22
nit: No need for the const in front of an int para
gab
2014/07/09 19:16:59
Indeed, not sure how this ended up there, it's not
| |
95 | 99 |
96 // Sets the machine-wide EULA consented flag required on OEM installs. | 100 // Sets the machine-wide EULA consented flag required on OEM installs. |
97 // Returns false if the setting could not be recorded. | 101 // Returns false if the setting could not be recorded. |
98 static bool SetEULAConsent(const installer::InstallationState& machine_state, | 102 static bool SetEULAConsent(const installer::InstallationState& machine_state, |
99 BrowserDistribution* dist, | 103 BrowserDistribution* dist, |
100 bool consented); | 104 bool consented); |
101 | 105 |
102 // Returns the last time chrome was run in days. It uses a recorded value | 106 // Returns the last time chrome was run in days. It uses a recorded value |
103 // set by SetLastRunTime(). Returns -1 if the value was not found or if | 107 // set by SetLastRunTime(). Returns -1 if the value was not found or if |
104 // the value is corrupted. | 108 // the value is corrupted. |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
306 // this will do nothing to |experiment_labels|. This will return true if the | 310 // this will do nothing to |experiment_labels|. This will return true if the |
307 // label did not exist, or was successfully read. | 311 // label did not exist, or was successfully read. |
308 static bool ReadExperimentLabels(bool system_install, | 312 static bool ReadExperimentLabels(bool system_install, |
309 base::string16* experiment_labels); | 313 base::string16* experiment_labels); |
310 | 314 |
311 private: | 315 private: |
312 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings); | 316 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings); |
313 }; | 317 }; |
314 | 318 |
315 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ | 319 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ |
OLD | NEW |