Chromium Code Reviews| 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)) |