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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
| 10 #include <memory> |
10 #include <string> | 11 #include <string> |
11 | 12 |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "base/version.h" | 16 #include "base/version.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 #include "chrome/installer/util/util_constants.h" | 18 #include "chrome/installer/util/util_constants.h" |
19 #include "components/metrics/client_info.h" | 19 #include "components/metrics/client_info.h" |
20 | 20 |
21 class AppRegistrationData; | 21 class AppRegistrationData; |
22 class BrowserDistribution; | 22 class BrowserDistribution; |
23 | 23 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // Sets the user consent to send UMA and crash dumps to Google. Returns | 91 // Sets the user consent to send UMA and crash dumps to Google. Returns |
92 // false if the setting could not be recorded. | 92 // false if the setting could not be recorded. |
93 static bool SetCollectStatsConsentAtLevel(bool system_install, | 93 static bool SetCollectStatsConsentAtLevel(bool system_install, |
94 bool consented); | 94 bool consented); |
95 #endif | 95 #endif |
96 | 96 |
97 // Returns the metrics client info backed up in the registry. NULL | 97 // Returns the metrics client info backed up in the registry. NULL |
98 // if-and-only-if the client_id couldn't be retrieved (failure to retrieve | 98 // if-and-only-if the client_id couldn't be retrieved (failure to retrieve |
99 // other fields only makes them keep their default value). A non-null return | 99 // other fields only makes them keep their default value). A non-null return |
100 // will NEVER contain an empty client_id field. | 100 // will NEVER contain an empty client_id field. |
101 static scoped_ptr<metrics::ClientInfo> LoadMetricsClientInfo(); | 101 static std::unique_ptr<metrics::ClientInfo> LoadMetricsClientInfo(); |
102 | 102 |
103 // Stores a backup of the metrics client info in the registry. Storing a | 103 // Stores a backup of the metrics client info in the registry. Storing a |
104 // |client_info| with an empty client id will effectively void the backup. | 104 // |client_info| with an empty client id will effectively void the backup. |
105 static void StoreMetricsClientInfo(const metrics::ClientInfo& client_info); | 105 static void StoreMetricsClientInfo(const metrics::ClientInfo& client_info); |
106 | 106 |
107 // Sets the machine-wide EULA consented flag required on OEM installs. | 107 // Sets the machine-wide EULA consented flag required on OEM installs. |
108 // Returns false if the setting could not be recorded. | 108 // Returns false if the setting could not be recorded. |
109 static bool SetEULAConsent(const installer::InstallationState& machine_state, | 109 static bool SetEULAConsent(const installer::InstallationState& machine_state, |
110 BrowserDistribution* dist, | 110 BrowserDistribution* dist, |
111 bool consented); | 111 bool consented); |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 // this will do nothing to |experiment_labels|. This will return true if the | 328 // this will do nothing to |experiment_labels|. This will return true if the |
329 // label did not exist, or was successfully read. | 329 // label did not exist, or was successfully read. |
330 static bool ReadExperimentLabels(bool system_install, | 330 static bool ReadExperimentLabels(bool system_install, |
331 base::string16* experiment_labels); | 331 base::string16* experiment_labels); |
332 | 332 |
333 private: | 333 private: |
334 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings); | 334 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings); |
335 }; | 335 }; |
336 | 336 |
337 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ | 337 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ |
OLD | NEW |