Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/PluginMimeFilterClient.cpp

Issue 11376138: HTTPS support (Closed)
Patch Set: Created Aug. 11, 2013, 4:54 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/plugin/PluginMimeFilterClient.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginMimeFilterClient.cpp
===================================================================
--- a/src/plugin/PluginMimeFilterClient.cpp
+++ b/src/plugin/PluginMimeFilterClient.cpp
@@ -8,13 +8,14 @@
typedef PassthroughAPP::CMetaFactory<PassthroughAPP::CComClassFactoryProtocol,WBPassthru> MetaFactory;
-CPluginMimeFilterClient::CPluginMimeFilterClient() : m_classFactory(NULL), m_spCFHTTP(NULL)
+CPluginMimeFilterClient::CPluginMimeFilterClient() : m_classFactory(NULL), m_spCFHTTP(NULL), m_spCFHTTPS(NULL)
{
// Should only be called once
// We register mime filters here
// Register asynchronous protocol
CComPtr<IInternetSession> spSession;
m_spCFHTTP = NULL;
+ m_spCFHTTPS = NULL;
Felix Dahlke 2013/08/11 17:00:36 No need to set this to NULL here if you do it in t
HRESULT hr = ::CoInternetGetSession(0, &spSession, 0);
if (FAILED(hr) || !spSession)
{
@@ -35,6 +36,21 @@
DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_SESSION, PLUGIN_ERROR_SESSION_REGISTER_HTTP_NAMESPACE, "MimeClient::RegisterNameSpace failed");
return;
}
+
+ hr = MetaFactory::CreateInstance(CLSID_HttpSProtocol, &m_spCFHTTPS);
+ if (FAILED(hr) || !m_spCFHTTPS)
+ {
+ DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_SESSION, PLUGIN_ERROR_SESSION_CREATE_HTTPS_INSTANCE, "MimeClient::CreateInstance failed");
+ return;
+ }
+
+ hr = spSession->RegisterNameSpace(m_spCFHTTPS, CLSID_HttpSProtocol, L"https", 0, 0, 0);
+ if (FAILED(hr))
+ {
+ DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_SESSION, PLUGIN_ERROR_SESSION_REGISTER_HTTPS_NAMESPACE, "MimeClient::RegisterNameSpace failed");
+ return;
+ }
+
}
@@ -51,6 +67,13 @@
m_spCFHTTP.Release();
m_spCFHTTP = NULL;
}
+ spSession->UnregisterNameSpace(m_spCFHTTPS, L"https");
+ if (m_spCFHTTPS != NULL)
+ {
+ m_spCFHTTPS.Release();
+ m_spCFHTTPS = NULL;
+ }
+
}
}
@@ -62,5 +85,6 @@
if (spSession)
{
spSession->UnregisterNameSpace(m_spCFHTTP, L"http");
+ spSession->UnregisterNameSpace(m_spCFHTTPS, L"https");
}
}
« no previous file with comments | « src/plugin/PluginMimeFilterClient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld