| 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 id set in the registry (that can be used in crash | 89 // Returns the metrics client id backed up in the registry. If none found, |
| 90 // reports). If none found, returns empty string. | 90 // returns empty string. |
| 91 static bool GetMetricsId(std::string* metrics_id); | 91 static bool LoadMetricsClientId(std::string* metrics_id); |
| 92 | 92 |
| 93 // Sets the metrics id to be used in crash reports. | 93 // Stores a backup of the metrics client id in the registry. |
| 94 static bool SetMetricsId(const std::string& metrics_id); | 94 static bool StoreMetricsClientId(const std::string& metrics_id); |
| 95 | 95 |
| 96 // Sets the machine-wide EULA consented flag required on OEM installs. | 96 // Sets the machine-wide EULA consented flag required on OEM installs. |
| 97 // Returns false if the setting could not be recorded. | 97 // Returns false if the setting could not be recorded. |
| 98 static bool SetEULAConsent(const installer::InstallationState& machine_state, | 98 static bool SetEULAConsent(const installer::InstallationState& machine_state, |
| 99 BrowserDistribution* dist, | 99 BrowserDistribution* dist, |
| 100 bool consented); | 100 bool consented); |
| 101 | 101 |
| 102 // Returns the last time chrome was run in days. It uses a recorded value | 102 // 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 | 103 // set by SetLastRunTime(). Returns -1 if the value was not found or if |
| 104 // the value is corrupted. | 104 // 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 | 306 // this will do nothing to |experiment_labels|. This will return true if the |
| 307 // label did not exist, or was successfully read. | 307 // label did not exist, or was successfully read. |
| 308 static bool ReadExperimentLabels(bool system_install, | 308 static bool ReadExperimentLabels(bool system_install, |
| 309 base::string16* experiment_labels); | 309 base::string16* experiment_labels); |
| 310 | 310 |
| 311 private: | 311 private: |
| 312 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings); | 312 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings); |
| 313 }; | 313 }; |
| 314 | 314 |
| 315 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ | 315 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ |
| OLD | NEW |