summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util
diff options
context:
space:
mode:
authorwfh <wfh@chromium.org>2015-07-02 05:57:22 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-02 12:57:55 +0000
commitf71f56ff7ccfe0ff63e0a575ecab6bf50024d56a (patch)
tree84a700f8fd35ce8117a4f0bceab9e642fb8c39c9 /chrome/installer/util
parentc50f502dfb55c5df3e3f1888ce6ad8cb985a8a57 (diff)
downloadchromium_src-f71f56ff7ccfe0ff63e0a575ecab6bf50024d56a.zip
chromium_src-f71f56ff7ccfe0ff63e0a575ecab6bf50024d56a.tar.gz
chromium_src-f71f56ff7ccfe0ff63e0a575ecab6bf50024d56a.tar.bz2
Only attmept to modify experiments key if it is present and valid.
BUG=474417 Review URL: https://codereview.chromium.org/1213453002 Cr-Commit-Position: refs/heads/master@{#337211}
Diffstat (limited to 'chrome/installer/util')
-rw-r--r--chrome/installer/util/google_update_settings.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/installer/util/google_update_settings.cc b/chrome/installer/util/google_update_settings.cc
index aba1fea..2a7c06c8 100644
--- a/chrome/installer/util/google_update_settings.cc
+++ b/chrome/installer/util/google_update_settings.cc
@@ -929,6 +929,10 @@ bool GoogleUpdateSettings::SetExperimentLabels(
system_install ? dist->GetStateMediumKey() : dist->GetStateKey());
RegKey client_state(
reg_root, client_state_path.c_str(), KEY_SET_VALUE | KEY_WOW64_32KEY);
+ // It is possible that the registry keys do not yet exist or have not yet
+ // been ACLed by Google Update to be user writable.
+ if (!client_state.Valid())
+ return false;
if (experiment_labels.empty()) {
success = client_state.DeleteValue(google_update::kExperimentLabels)
== ERROR_SUCCESS;