diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-06 15:34:20 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-06 15:34:20 +0000 |
commit | f82d361654e9b96dbd9f94b63842d65b95814fed (patch) | |
tree | 5792ee6ec523449a9db6289a0431285b6522ce3a /chrome/installer/util/google_update_settings.h | |
parent | b7bc78efbf94b55cfb20264a90af5e1ea7a317d2 (diff) | |
download | chromium_src-f82d361654e9b96dbd9f94b63842d65b95814fed.zip chromium_src-f82d361654e9b96dbd9f94b63842d65b95814fed.tar.gz chromium_src-f82d361654e9b96dbd9f94b63842d65b95814fed.tar.bz2 |
Write the outcome of the Toast Experiment for system-level installs to the right registry key.
BUG=44378
TEST=None
Review URL: http://codereview.chromium.org/3308003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/google_update_settings.h')
-rw-r--r-- | chrome/installer/util/google_update_settings.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/chrome/installer/util/google_update_settings.h b/chrome/installer/util/google_update_settings.h index 6e12cb66..715ef9f 100644 --- a/chrome/installer/util/google_update_settings.h +++ b/chrome/installer/util/google_update_settings.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -105,6 +105,23 @@ class GoogleUpdateSettings { int install_return_code, const std::wstring& value); + // For system-level installs, we need to be able to communicate the results + // of the Toast Experiments back to Google Update. The problem is just that + // the experiment is run in the context of the user, which doesn't have + // write access to the HKLM key that Google Update expects the results in. + // However, when we are about to switch contexts from system to user, we can + // duplicate the handle to the registry key and pass it (through handle + // inheritance) to the newly created child process that is launched as the + // user, allowing the child process to write to the key, with the + // WriteGoogleUpdateSystemClientKey function below. + static int DuplicateGoogleUpdateSystemClientKey(); + + // Takes a |handle| to a registry key and writes |value| string into the + // specified |key|. See DuplicateGoogleUpdateSystemClientKey for details. + static bool WriteGoogleUpdateSystemClientKey(int handle, + const std::wstring& key, + const std::wstring& value); + // True if a build is strictly organic, according to its brand code. static bool IsOrganic(const std::wstring& brand); |