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

Side by Side Diff: src/plugin/PluginWbPassThrough.cpp

Issue 11167069: Fix the crash. IInternetBindInfo BINDSTRING_XDR_ORIGIN bug workaround. (Closed)
Patch Set: Another unused hr removed Created Aug. 9, 2013, 9:47 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include "PluginWbPassThrough.h" 3 #include "PluginWbPassThrough.h"
4 #include "PluginClient.h" 4 #include "PluginClient.h"
5 #include "PluginClientFactory.h" 5 #include "PluginClientFactory.h"
6 #ifdef SUPPORT_FILTER 6 #ifdef SUPPORT_FILTER
7 #include "PluginFilter.h" 7 #include "PluginFilter.h"
8 #endif 8 #endif
9 #include "PluginSettings.h" 9 #include "PluginSettings.h"
10 #include "PluginClass.h" 10 #include "PluginClass.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 DEBUG_GENERAL(src); 130 DEBUG_GENERAL(src);
131 CPluginClient::UnescapeUrl(src); 131 CPluginClient::UnescapeUrl(src);
132 m_url = szUrl; 132 m_url = szUrl;
133 133
134 CString boundDomain; 134 CString boundDomain;
135 CString mimeType; 135 CString mimeType;
136 if (pOIBindInfo) 136 if (pOIBindInfo)
137 { 137 {
138 ULONG resLen = 0; 138 ULONG resLen = 0;
139 LPOLESTR mime = 0; 139 LPOLESTR mime = 0;
140 HRESULT hr = pOIBindInfo->GetBindString(BINDSTRING_ACCEPT_MIMES, &mime, 1, & resLen); 140 pOIBindInfo->GetBindString(BINDSTRING_ACCEPT_MIMES, &mime, 1, &resLen);
141 if (mime && resLen > 0) 141 if (mime && resLen > 0)
142 { 142 {
143 mimeType.SetString(mime); 143 mimeType.SetString(mime);
144 } 144 }
145 LPOLESTR bindToObject = 0; 145 LPOLESTR bindToObject = 0;
146 hr = pOIBindInfo->GetBindString(BINDSTRING_FLAG_BIND_TO_OBJECT, &bindToObjec t, 1, &resLen); 146 pOIBindInfo->GetBindString(BINDSTRING_FLAG_BIND_TO_OBJECT, &bindToObject, 1, &resLen);
147 LPOLESTR domainRetrieved = 0; 147 LPOLESTR domainRetrieved = 0;
148 if (resLen == 0 || wcscmp(bindToObject, L"FALSE") == 0) 148 if (resLen == 0 || wcscmp(bindToObject, L"FALSE") == 0)
149 { 149 {
150 hr = pOIBindInfo->GetBindString(BINDSTRING_XDR_ORIGIN, &domainRetrieved, 1 , &resLen); 150 HRESULT hr = pOIBindInfo->GetBindString(BINDSTRING_XDR_ORIGIN, &domainRetr ieved, 1, &resLen);
151 if ((hr == S_OK) && domainRetrieved && (resLen > 0)) 151 if ((hr == S_OK) && domainRetrieved && (resLen > 0))
152 { 152 {
153 boundDomain.SetString(domainRetrieved); 153 boundDomain.SetString(domainRetrieved);
154 // Remove protocol 154 // Remove protocol
155 int pos = boundDomain.Find(L"://"); 155 int pos = boundDomain.Find(L"://");
156 if (pos > 0) 156 if (pos > 0)
157 { 157 {
158 boundDomain = boundDomain.Mid(pos + 3); 158 boundDomain = boundDomain.Mid(pos + 3);
159 } 159 }
160 // Remove port 160 // Remove port
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 CComPtr<IHttpNegotiate> spHttpNegotiate; 367 CComPtr<IHttpNegotiate> spHttpNegotiate;
368 QueryServiceFromClient(&spHttpNegotiate); 368 QueryServiceFromClient(&spHttpNegotiate);
369 369
370 return spHttpNegotiate ? spHttpNegotiate->OnResponse(dwResponseCode, szRespons eHeaders, szRequestHeaders, pszAdditionalRequestHeaders) : S_OK; 370 return spHttpNegotiate ? spHttpNegotiate->OnResponse(dwResponseCode, szRespons eHeaders, szRequestHeaders, pszAdditionalRequestHeaders) : S_OK;
371 } 371 }
372 372
373 STDMETHODIMP WBPassthruSink::ReportProgress(ULONG ulStatusCode, LPCWSTR szStatus Text) 373 STDMETHODIMP WBPassthruSink::ReportProgress(ULONG ulStatusCode, LPCWSTR szStatus Text)
374 { 374 {
375 return m_spInternetProtocolSink ? m_spInternetProtocolSink->ReportProgress(ulS tatusCode, szStatusText) : S_OK; 375 return m_spInternetProtocolSink ? m_spInternetProtocolSink->ReportProgress(ulS tatusCode, szStatusText) : S_OK;
376 } 376 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld