Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9364)

Unified Diff: chrome_frame/chrome_tab.cc

Issue 7276037: Remove NPAPI support from Chrome Frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/chrome_frame_plugin.h ('k') | chrome_frame/chrome_tab.def » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « chrome_frame/chrome_frame_plugin.h ('k') | chrome_frame/chrome_tab.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698