Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: chrome/installer/util/google_update_settings.h

Issue 7111012: Return a new error code for multi-install updates if Group Policy settings blocking... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "chrome/installer/util/util_constants.h" 12 #include "chrome/installer/util/util_constants.h"
13 13
14 namespace installer { 14 namespace installer {
15 class ChannelInfo; 15 class ChannelInfo;
16 class InstallerState; 16 class InstallerState;
17 } 17 }
18 18
19 // This class provides accessors to the Google Update 'ClientState' information 19 // This class provides accessors to the Google Update 'ClientState' information
20 // that recorded when the user downloads the chrome installer. It is 20 // that recorded when the user downloads the chrome installer. It is
21 // google_update.exe responsability to write the initial values. 21 // google_update.exe responsability to write the initial values.
22 class GoogleUpdateSettings { 22 class GoogleUpdateSettings {
23 public: 23 public:
24 enum UpdatePolicy {
25 UPDATES_DISABLED,
26 AUTOMATIC_UPDATES,
27 MANUAL_UPDATES_ONLY,
28 };
29
24 // Returns whether the user has given consent to collect UMA data and send 30 // Returns whether the user has given consent to collect UMA data and send
25 // crash dumps to Google. This information is collected by the web server 31 // crash dumps to Google. This information is collected by the web server
26 // used to download the chrome installer. 32 // used to download the chrome installer.
27 static bool GetCollectStatsConsent(); 33 static bool GetCollectStatsConsent();
28 34
29 // Sets the user consent to send UMA and crash dumps to Google. Returns 35 // Sets the user consent to send UMA and crash dumps to Google. Returns
30 // false if the setting could not be recorded. 36 // false if the setting could not be recorded.
31 static bool SetCollectStatsConsent(bool consented); 37 static bool SetCollectStatsConsent(bool consented);
32 38
33 // Returns the metrics id set in the registry (that can be used in crash 39 // Returns the metrics id set in the registry (that can be used in crash
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 const std::wstring& value); 159 const std::wstring& value);
154 160
155 // True if a build is strictly organic, according to its brand code. 161 // True if a build is strictly organic, according to its brand code.
156 static bool IsOrganic(const std::wstring& brand); 162 static bool IsOrganic(const std::wstring& brand);
157 163
158 // True if a build should run as organic in the first run process. This uses 164 // True if a build should run as organic in the first run process. This uses
159 // a slightly different set of brand codes from the standard IsOrganic 165 // a slightly different set of brand codes from the standard IsOrganic
160 // method. 166 // method.
161 static bool IsOrganicFirstRun(const std::wstring& brand); 167 static bool IsOrganicFirstRun(const std::wstring& brand);
162 168
169 // Returns the effective update policy for |app_guid| as dictated by
170 // Group Policy settings. |is_overridden|, if non-NULL, is populated with
171 // true if an app-specific policy override is in force, or false otherwise.
172 static UpdatePolicy GetAppUpdatePolicy(const std::wstring& app_guid,
173 bool* is_overridden);
174
163 private: 175 private:
164 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings); 176 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings);
165 }; 177 };
166 178
167 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ 179 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698