diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-21 20:07:35 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-21 20:07:35 +0000 |
commit | 2b3102bea014c815d42aaf99a97e8da462a6ea5c (patch) | |
tree | 9bea75fee6c9dc116e0d5e4ee3e6fad600fafcd4 /chrome_frame/utils.cc | |
parent | e70313140106d364cb359179773c656c6d84423c (diff) | |
download | chromium_src-2b3102bea014c815d42aaf99a97e8da462a6ea5c.zip chromium_src-2b3102bea014c815d42aaf99a97e8da462a6ea5c.tar.gz chromium_src-2b3102bea014c815d42aaf99a97e8da462a6ea5c.tar.bz2 |
Only switch to cf for text/html. With opt-in URLs we could mark a URL to be loaded in CF regardless of the target mime type. If CF turns around and wants to download the target, we would hit an infinite loop.
TEST=Verify that issue 40046 is resolved. OptIn urls should work with the moniker patch and downloads should not cause an infinite loop.
BUG=40046
Review URL: http://codereview.chromium.org/1715004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45226 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/utils.cc')
-rw-r--r-- | chrome_frame/utils.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc index 52489a1..4642d51 100644 --- a/chrome_frame/utils.cc +++ b/chrome_frame/utils.cc @@ -1058,6 +1058,19 @@ int GetHttpResponseStatusFromBinding(IBinding* binding) { return http_status; } +CLIPFORMAT GetTextHtmlClipboardFormat() { + static const CLIPFORMAT text_html = RegisterClipboardFormat(CFSTR_MIME_HTML); + return text_html; +} + +bool IsTextHtmlMimeType(const wchar_t* mime_type) { + return IsTextHtmlClipFormat(RegisterClipboardFormatW(mime_type)); +} + +bool IsTextHtmlClipFormat(CLIPFORMAT cf) { + return cf == GetTextHtmlClipboardFormat(); +} + ProtocolPatchMethod GetPatchMethod() { ProtocolPatchMethod patch_method = static_cast<ProtocolPatchMethod>( @@ -1067,7 +1080,6 @@ ProtocolPatchMethod GetPatchMethod() { bool MonikerPatchEnabled() { ProtocolPatchMethod patch_method = GetPatchMethod(); - LOG_IF(ERROR, patch_method != PATCH_METHOD_MONIKER) - << "Not running test. Moniker patch not enabled."; return patch_method == PATCH_METHOD_MONIKER; } + |