| Index: chrome_frame/chrome_tab.cc
|
| ===================================================================
|
| --- chrome_frame/chrome_tab.cc (revision 90713)
|
| +++ chrome_frame/chrome_tab.cc (working copy)
|
| @@ -485,8 +485,6 @@
|
| BHO_REGISTRATION = 0x0010,
|
| TYPELIB = 0x0020,
|
|
|
| - NPAPI_PLUGIN = 0x1000,
|
| -
|
| ALL = 0xFFFF
|
| };
|
|
|
| @@ -571,8 +569,11 @@
|
| 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 @@
|
| 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 @@
|
| 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 @@
|
| 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)
|
|
|