summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_tab.cc
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-27 16:44:31 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-27 16:44:31 +0000
commit6a7748e79cb7118089d5857291cb76d57c5c8162 (patch)
treebdfe13aba5f79d4c090bd27fdf75173ff751bb3c /chrome_frame/chrome_tab.cc
parent13ffa32ea65d5fda56bcb030643b989d5564c586 (diff)
downloadchromium_src-6a7748e79cb7118089d5857291cb76d57c5c8162.zip
chromium_src-6a7748e79cb7118089d5857291cb76d57c5c8162.tar.gz
chromium_src-6a7748e79cb7118089d5857291cb76d57c5c8162.tar.bz2
Add a self-destruct mechanism to user-level Chrome Frame when it detects that system-level Chrome Frame is present. This is a first step to handling user-to-system-level handoff.
It will cause a user-level install to be correctly replaced with a system-level one once the user logs out and back in again. Additional changelists will follow that: 1) Ensure full clean-up of the user-level installation. 2) Handle notifications such that logging out and in again isn't required. BUG=82816 TEST=Install user-level Chrome Frame. Review URL: http://codereview.chromium.org/7065024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87033 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_tab.cc')
-rw-r--r--chrome_frame/chrome_tab.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc
index b7d2898..61f9a18 100644
--- a/chrome_frame/chrome_tab.cc
+++ b/chrome_frame/chrome_tab.cc
@@ -70,6 +70,7 @@ const wchar_t kRunOnce[] =
const wchar_t kRunKeyName[] = L"ChromeFrameHelper";
const wchar_t kChromeFrameHelperExe[] = L"chrome_frame_helper.exe";
+const wchar_t kChromeFrameHelperStartupArg[] = L"--startup";
// Window class and window names.
// TODO(robertshield): These and other constants need to be refactored into
@@ -314,7 +315,6 @@ HRESULT SetupRunOnce() {
// Use this only for the dev channel and CEEE channels.
if (channel_name.find(L"dev") != std::wstring::npos ||
channel_name.find(L"ceee") != std::wstring::npos) {
-
HKEY hive = HKEY_CURRENT_USER;
if (IsSystemProcess()) {
// For system installs, our updates will be running as SYSTEM which
@@ -375,9 +375,14 @@ void SetupUserLevelHelper() {
kChromeFrameHelperWindowName);
if (file_util::PathExists(helper_path)) {
+ std::wstring helper_path_cmd(L"\"");
+ helper_path_cmd += helper_path.value();
+ helper_path_cmd += L"\" ";
+ helper_path_cmd += kChromeFrameHelperStartupArg;
+
// Add new run-at-startup entry.
base::win::AddCommandToAutoRun(HKEY_CURRENT_USER, kRunKeyName,
- helper_path.value());
+ helper_path_cmd);
// Start new instance.
bool launched = base::LaunchApp(helper_path.value(), false, true, NULL);