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

Unified Diff: chrome_frame/protocol_sink_wrap.cc

Issue 2893015: Do not wrap non-HTTP(s) requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/protocol_sink_wrap.cc
===================================================================
--- chrome_frame/protocol_sink_wrap.cc (revision 52337)
+++ chrome_frame/protocol_sink_wrap.cc (working copy)
@@ -145,7 +145,13 @@
}
bool ShouldWrapSink(IInternetProtocolSink* sink, const wchar_t* url) {
- // TODO(stoyan): check the url scheme for http/https.
+ // Ignore everything that does not start with http:// or https://.
+ // |url| is already normalized (i.e. no leading spaces, capital letters in
+ // protocol etc) and non-null (we check in Hook_Start).
+ DCHECK(url != NULL);
+ if ((url != StrStrW(url, L"http://")) && (url != StrStrW(url, L"https://")))
tommi (sloooow) - chröme 2010/07/14 19:18:44 use StartsWith?
stoyan 2010/07/14 19:34:10 StartsWith wants me to create std::string object.
+ return false;
+
ScopedComPtr<IHttpNegotiate> http_negotiate;
HRESULT hr = DoQueryService(GUID_NULL, sink, http_negotiate.Receive());
if (http_negotiate && !IsSubFrameRequest(http_negotiate))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698