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

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

Issue 2718063002: Use install_static::GetAppGuid in place of BrowserDistribution and AppRegistrationData. (Closed)
Patch Set: huangs feedback plus Chromium test fix Created 3 years, 9 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
OLDNEW
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 <memory>
11 #include <string> 11 #include <string>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "base/strings/string_piece.h"
16 #include "base/time/time.h" 17 #include "base/time/time.h"
17 #include "base/version.h" 18 #include "base/version.h"
18 #include "build/build_config.h" 19 #include "build/build_config.h"
19 #include "chrome/installer/util/google_update_constants.h" 20 #include "chrome/installer/util/google_update_constants.h"
20 #include "chrome/installer/util/util_constants.h" 21 #include "chrome/installer/util/util_constants.h"
21 #include "components/metrics/client_info.h" 22 #include "components/metrics/client_info.h"
22 23
23 class AppRegistrationData; 24 class AppRegistrationData;
24 class BrowserDistribution; 25 class BrowserDistribution;
25 26
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 246
246 // Takes a |handle| to a registry key and writes |value| string into the 247 // Takes a |handle| to a registry key and writes |value| string into the
247 // specified |key|. See DuplicateGoogleUpdateSystemClientKey for details. 248 // specified |key|. See DuplicateGoogleUpdateSystemClientKey for details.
248 static bool WriteGoogleUpdateSystemClientKey(int handle, 249 static bool WriteGoogleUpdateSystemClientKey(int handle,
249 const base::string16& key, 250 const base::string16& key,
250 const base::string16& value); 251 const base::string16& value);
251 252
252 // Returns the effective update policy for |app_guid| as dictated by 253 // Returns the effective update policy for |app_guid| as dictated by
253 // Group Policy settings. |is_overridden|, if non-NULL, is populated with 254 // Group Policy settings. |is_overridden|, if non-NULL, is populated with
254 // true if an app-specific policy override is in force, or false otherwise. 255 // true if an app-specific policy override is in force, or false otherwise.
255 static UpdatePolicy GetAppUpdatePolicy(const base::string16& app_guid, 256 static UpdatePolicy GetAppUpdatePolicy(base::StringPiece16 app_guid,
256 bool* is_overridden); 257 bool* is_overridden);
257 258
258 // Returns true if Chrome should be updated automatically by Google Update 259 // Returns true if Chrome should be updated automatically by Google Update
259 // based on current autoupdate settings. This is distinct from 260 // based on current autoupdate settings. This is distinct from
260 // GetAppUpdatePolicy (which checks only the policy for a given app), as it 261 // GetAppUpdatePolicy (which checks only the policy for a given app), as it
261 // checks for general Google Update configuration as well as multi-install 262 // checks for general Google Update configuration as well as multi-install
262 // Chrome. Note that for Chromium builds, this returns false since Chromium is 263 // Chrome. Note that for Chromium builds, this returns false since Chromium is
263 // assumed not to autoupdate. 264 // assumed not to autoupdate.
264 static bool AreAutoupdatesEnabled(); 265 static bool AreAutoupdatesEnabled();
265 266
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 // this will do nothing to |experiment_labels|. This will return true if the 334 // this will do nothing to |experiment_labels|. This will return true if the
334 // label did not exist, or was successfully read. 335 // label did not exist, or was successfully read.
335 static bool ReadExperimentLabels(bool system_install, 336 static bool ReadExperimentLabels(bool system_install,
336 base::string16* experiment_labels); 337 base::string16* experiment_labels);
337 338
338 private: 339 private:
339 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings); 340 DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings);
340 }; 341 };
341 342
342 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_ 343 #endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_
OLDNEW
« no previous file with comments | « chrome/installer/util/google_chrome_distribution.cc ('k') | chrome/installer/util/google_update_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698