summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_tab.cc
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/chrome_tab.cc
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/chrome_tab.cc')
-rw-r--r--chrome_frame/chrome_tab.cc15
1 files changed, 10 insertions, 5 deletions
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();
}