summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorgrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-23 20:48:58 +0000
committergrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-23 20:48:58 +0000
commit848bdf233744cbac6de76f569c19614404443828 (patch)
treeb42c698778e602f4f49d91352a7de591e9cda3dc /chrome_frame
parent8208335b3360a6cd209c51f3906140a9a6425b09 (diff)
downloadchromium_src-848bdf233744cbac6de76f569c19614404443828.zip
chromium_src-848bdf233744cbac6de76f569c19614404443828.tar.gz
chromium_src-848bdf233744cbac6de76f569c19614404443828.tar.bz2
Fix in-use updates for Chrome Frame.
On in-use updates, make a copy of the old chrome launcher's IE low rights elevation policy prior to registering the new npchrome_frame.dll so that running instances of IE can still launch Chrome. In so doing, I also removed elevation policy addition/removal code from the installer so that npchrome_frame.dll's {un,}registration code is the one and only place where this is done. BUG=95810 TEST=Install a previous version of GCF, run IE and visit some page that activates GCF, update to a version of GCF containing this fix, then try to visit another page that will activate GCF. If all goes well, you won't see an IE security prompt. Review URL: http://codereview.chromium.org/7976045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102569 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/chrome_frame_activex.rgs10
-rw-r--r--chrome_frame/chrome_frame_elevation.rgs4
-rw-r--r--chrome_frame/chrome_tab.cc15
3 files changed, 17 insertions, 12 deletions
diff --git a/chrome_frame/chrome_frame_activex.rgs b/chrome_frame/chrome_frame_activex.rgs
index 966e48e..724fc94 100644
--- a/chrome_frame/chrome_frame_activex.rgs
+++ b/chrome_frame/chrome_frame_activex.rgs
@@ -2,14 +2,14 @@
NoRemove Software {
NoRemove Classes {
ChromeTab.ChromeFrame.1 = s 'Chrome Frame' {
- CLSID = s '{E0A900DF-9611-4446-86BD-4B1D47E7DB2A}'
+ CLSID = s '%CHROME_FRAME_CLSID%'
}
ChromeTab.ChromeFrame = s 'Chrome Frame' {
- CLSID = s '{E0A900DF-9611-4446-86BD-4B1D47E7DB2A}'
+ CLSID = s '%CHROME_FRAME_CLSID%'
CurVer = s 'ChromeTab.ChromeFrame.1'
}
NoRemove CLSID {
- ForceRemove {E0A900DF-9611-4446-86BD-4B1D47E7DB2A} = s 'Chrome Frame' {
+ ForceRemove %CHROME_FRAME_CLSID% = s 'Chrome Frame' {
ProgID = s 'ChromeTab.ChromeFrame.1'
VersionIndependentProgID = s 'ChromeTab.ChromeFrame'
ForceRemove 'Programmable'
@@ -35,11 +35,11 @@
NoRemove CurrentVersion {
NoRemove Ext {
NoRemove PreApproved {
- ForceRemove '{E0A900DF-9611-4446-86BD-4B1D47E7DB2A}' = s '' {
+ ForceRemove '%CHROME_FRAME_CLSID%' = s '' {
}
}
NoRemove Stats {
- ForceRemove {E0A900DF-9611-4446-86BD-4B1D47E7DB2A} {
+ ForceRemove %CHROME_FRAME_CLSID% {
ForceRemove 'iexplore' {
val Type = d '1'
val Flags = d '4'
diff --git a/chrome_frame/chrome_frame_elevation.rgs b/chrome_frame/chrome_frame_elevation.rgs
index ee4485d..9684583 100644
--- a/chrome_frame/chrome_frame_elevation.rgs
+++ b/chrome_frame/chrome_frame_elevation.rgs
@@ -4,14 +4,14 @@
NoRemove 'Internet Explorer' {
NoRemove 'Low Rights' {
NoRemove ElevationPolicy {
- ForceRemove '{E0A900DF-9611-4446-86BD-4B1D47E7DB2A}' = s '' {
+ ForceRemove '%CHROME_FRAME_CLSID%' = s '' {
val Policy = d '3'
val AppName = s '%CHROME_LAUNCHER_APPNAME%'
val AppPath = s '%CHROME_LAUNCHER_APPPATH%'
}
}
NoRemove DragDrop {
- ForceRemove '{E0A900DF-9611-4446-86BD-4B1D47E7DB2A}' = s '' {
+ ForceRemove '%CHROME_FRAME_CLSID%' = s '' {
val Policy = d '3'
val AppName = s '%CHROME_APPNAME%'
val AppPath = s '%CHROME_APPPATH%'
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc
index 7b80394..7cd7706 100644
--- a/chrome_frame/chrome_tab.cc
+++ b/chrome_frame/chrome_tab.cc
@@ -8,6 +8,7 @@
#include "chrome_tab.h" // NOLINT
#include <atlsecurity.h>
+#include <objbase.h>
#include "base/at_exit.h"
#include "base/command_line.h"
@@ -173,6 +174,13 @@ class ChromeTabModule : public CAtlDllModuleT<ChromeTabModule> {
DCHECK(SUCCEEDED(hr));
}
+ if (SUCCEEDED(hr)) {
+ // Add the Chrome Frame CLSID.
+ wchar_t cf_clsid[64];
+ StringFromGUID2(CLSID_ChromeFrame, &cf_clsid[0], arraysize(cf_clsid));
+ hr = registrar->AddReplacement(L"CHROME_FRAME_CLSID", &cf_clsid[0]);
+ }
+
return hr;
}
@@ -599,13 +607,10 @@ HRESULT RegisterActiveX(bool reg, bool is_system) {
HRESULT RegisterElevationPolicy(bool reg, bool is_system) {
HRESULT hr = S_OK;
- if (reg && base::win::GetVersion() >= base::win::VERSION_VISTA) {
+ if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
// Register the elevation policy. This must succeed for Chrome Frame to
// be able launch Chrome when running in low-integrity IE.
- // Note that this is not done on unregistration, the installer will
- // explicitly remove the policy on uninstall.
- hr = _AtlModule.UpdateRegistryFromResourceS(IDR_CHROMEFRAME_ELEVATION,
- reg);
+ hr = _AtlModule.UpdateRegistryFromResourceS(IDR_CHROMEFRAME_ELEVATION, reg);
if (SUCCEEDED(hr)) {
hr = RefreshElevationPolicy();
}