| LEFT | RIGHT |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2016 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 #include "PluginStdAfx.h" | 18 #include "PluginStdAfx.h" |
| 19 #include "PluginMimeFilterClient.h" | 19 #include "PluginMimeFilterClient.h" |
| 20 #include "PluginWbPassThrough.h" | 20 #include "PluginWbPassThrough.h" |
| 21 | |
| 22 | |
| 23 typedef PassthroughAPP::CMetaFactory<PassthroughAPP::CComClassFactoryProtocol,WB
Passthru> MetaFactory; | |
| 24 | |
| 25 | 21 |
| 26 CPluginMimeFilterClient::CPluginMimeFilterClient() : m_classFactory(NULL), m_spC
FHTTP(NULL), m_spCFHTTPS(NULL) | 22 CPluginMimeFilterClient::CPluginMimeFilterClient() : m_classFactory(NULL), m_spC
FHTTP(NULL), m_spCFHTTPS(NULL) |
| 27 { | 23 { |
| 28 // Should only be called once | 24 // Should only be called once |
| 29 // We register mime filters here | 25 // We register mime filters here |
| 30 // Register asynchronous protocol | 26 // Register asynchronous protocol |
| 31 CComPtr<IInternetSession> spSession; | 27 CComPtr<IInternetSession> spSession; |
| 32 HRESULT hr = ::CoInternetGetSession(0, &spSession, 0); | 28 HRESULT hr = ::CoInternetGetSession(0, &spSession, 0); |
| 33 if (FAILED(hr) || !spSession) | 29 if (FAILED(hr) || !spSession) |
| 34 { | 30 { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 { | 90 { |
| 95 CComPtr<IInternetSession> spSession; | 91 CComPtr<IInternetSession> spSession; |
| 96 | 92 |
| 97 ::CoInternetGetSession(0, &spSession, 0); | 93 ::CoInternetGetSession(0, &spSession, 0); |
| 98 if (spSession) | 94 if (spSession) |
| 99 { | 95 { |
| 100 spSession->UnregisterNameSpace(m_spCFHTTP, L"http"); | 96 spSession->UnregisterNameSpace(m_spCFHTTP, L"http"); |
| 101 spSession->UnregisterNameSpace(m_spCFHTTPS, L"https"); | 97 spSession->UnregisterNameSpace(m_spCFHTTPS, L"https"); |
| 102 } | 98 } |
| 103 } | 99 } |
| LEFT | RIGHT |