summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_tab.cc
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-03 00:44:35 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-03 00:44:35 +0000
commit74ecb5a48410545f8b52019e0466fa4ab4336740 (patch)
tree30c2965f1b3b03e54ae254ed396cf6e085b69839 /chrome_frame/chrome_tab.cc
parent236c3feac542f868d7f2ddc7f62e98f9bc3196c3 (diff)
downloadchromium_src-74ecb5a48410545f8b52019e0466fa4ab4336740.zip
chromium_src-74ecb5a48410545f8b52019e0466fa4ab4336740.tar.gz
chromium_src-74ecb5a48410545f8b52019e0466fa4ab4336740.tar.bz2
Correct a problem whereby the prefetching experiment would never be scheduled for updates.
Review URL: http://codereview.chromium.org/3362001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58440 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_tab.cc')
-rw-r--r--chrome_frame/chrome_tab.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc
index 8036536..5e712a22 100644
--- a/chrome_frame/chrome_tab.cc
+++ b/chrome_frame/chrome_tab.cc
@@ -298,8 +298,15 @@ HRESULT SetupRunOnce() {
return S_OK;
}
+ HKEY hive = HKEY_CURRENT_USER;
+ if (IsSystemProcess()) {
+ // For system installs, our updates will be running as SYSTEM which
+ // makes writing to a RunOnce key under HKCU not so terribly useful.
+ hive = HKEY_LOCAL_MACHINE;
+ }
+
RegKey run_once;
- if (run_once.Create(HKEY_CURRENT_USER, kRunOnce, KEY_READ | KEY_WRITE)) {
+ if (run_once.Create(hive, kRunOnce, KEY_READ | KEY_WRITE)) {
CommandLine run_once_command(chrome_launcher::GetChromeExecutablePath());
run_once_command.AppendSwitchASCII(switches::kAutomationClientChannelID,
"0");