diff options
author | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-29 02:29:53 +0000 |
---|---|---|
committer | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-29 02:29:53 +0000 |
commit | 99d81e5b17ea11dd11be5cd88ae8446347ebab8c (patch) | |
tree | a862d90d8e4cb881f6b5522637e92214b81c78ff /chrome_frame/chrome_tab.cc | |
parent | dc8e66456af280e6d5c14ebd195e115fbe0b016c (diff) | |
download | chromium_src-99d81e5b17ea11dd11be5cd88ae8446347ebab8c.zip chromium_src-99d81e5b17ea11dd11be5cd88ae8446347ebab8c.tar.gz chromium_src-99d81e5b17ea11dd11be5cd88ae8446347ebab8c.tar.bz2 |
Remove 1) NPAPI support from Chrome Frame and 2) Firefox/Opera/Safari tests.
BUG=none
TEST=automated testing should suffice
R=ananta@chromium.org,robertshield@chromium.org
Review URL: http://codereview.chromium.org/7276037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90914 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_tab.cc')
-rw-r--r-- | chrome_frame/chrome_tab.cc | 53 |
1 files changed, 5 insertions, 48 deletions
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc index 61f9a18..4952cee 100644 --- a/chrome_frame/chrome_tab.cc +++ b/chrome_frame/chrome_tab.cc @@ -485,8 +485,6 @@ enum RegistrationFlags { BHO_REGISTRATION = 0x0010, TYPELIB = 0x0020, - NPAPI_PLUGIN = 0x1000, - ALL = 0xFFFF }; @@ -571,8 +569,11 @@ STDAPI CustomRegistration(UINT reg_flags, BOOL reg, bool is_system) { UtilUnRegisterTypeLib(_AtlComModule.m_hInstTypeLib, NULL, !is_system); } - if ((hr == S_OK) && (flags & NPAPI_PLUGIN)) { - hr = _AtlModule.UpdateRegistryFromResourceS(IDR_CHROMEFRAME_NPAPI, reg); + // Unconditionally remove NPAPI registration when unregistering any component. + if ((hr == S_OK) && !reg) { + // Ignore failures. + _AtlModule.UpdateRegistryFromResourceS(IDR_CHROMEFRAME_NPAPI, reg); + UtilRemovePersistentNPAPIMarker(); } if (hr == S_OK) { @@ -596,10 +597,6 @@ STDAPI DllRegisterServer() { UINT flags = ACTIVEX | ACTIVEDOC | TYPELIB | GCF_PROTOCOL | BHO_CLSID | BHO_REGISTRATION; - if (UtilIsPersistentNPAPIMarkerSet()) { - flags |= NPAPI_PLUGIN; - } - HRESULT hr = CustomRegistration(flags, TRUE, true); if (SUCCEEDED(hr)) { SetupRunOnce(); @@ -619,10 +616,6 @@ STDAPI DllRegisterUserServer() { UINT flags = ACTIVEX | ACTIVEDOC | TYPELIB | GCF_PROTOCOL | BHO_CLSID | BHO_REGISTRATION; - if (UtilIsPersistentNPAPIMarkerSet()) { - flags |= NPAPI_PLUGIN; - } - HRESULT hr = CustomRegistration(flags, TRUE, false); if (SUCCEEDED(hr)) { SetupRunOnce(); @@ -637,42 +630,6 @@ STDAPI DllUnregisterUserServer() { return hr; } -// Registers the NPAPI plugin and sets the persistent marker that tells us -// to re-register it through updates. -STDAPI RegisterNPAPIPlugin() { - HRESULT hr = _AtlModule.UpdateRegistryFromResourceS(IDR_CHROMEFRAME_NPAPI, - TRUE); - if (SUCCEEDED(hr) && _AtlModule.do_system_registration_) { - if (!UtilChangePersistentNPAPIMarker(true)) { - hr = E_FAIL; - } - } - return hr; -} - -// Unregisters the NPAPI plugin and clears the persistent marker that tells us -// to re-register it through updates. -STDAPI UnregisterNPAPIPlugin() { - HRESULT hr = _AtlModule.UpdateRegistryFromResourceS(IDR_CHROMEFRAME_NPAPI, - FALSE); - if (SUCCEEDED(hr) && _AtlModule.do_system_registration_) { - if (!UtilChangePersistentNPAPIMarker(false)) { - hr = E_FAIL; - } - } - return hr; -} - -STDAPI RegisterNPAPIUserPlugin() { - _AtlModule.do_system_registration_ = false; - return RegisterNPAPIPlugin(); -} - -STDAPI UnregisterNPAPIUserPlugin() { - _AtlModule.do_system_registration_ = false; - return UnregisterNPAPIPlugin(); -} - class SecurityDescBackup { public: explicit SecurityDescBackup(const std::wstring& backup_key) |