Provide the chrome frame content type from tests which is what we handle in our CFUrlmonBindStatusCallback. Also check for the tls browser service flag in OnDataAvailable.
TEST=Fixes BindToStorageSwitchContent and BindToStorageCacheContent
BUG=39415
TBR=amit
Review URL: http://codereview.chromium.org/1361003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42724 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome_frame/urlmon_bind_status_callback.cc b/chrome_frame/urlmon_bind_status_callback.cc
index 4b195b9..d7608ce 100644
--- a/chrome_frame/urlmon_bind_status_callback.cc
+++ b/chrome_frame/urlmon_bind_status_callback.cc
@@ -4,6 +4,8 @@
#include "chrome_frame/urlmon_bind_status_callback.h"
+#include <shlguid.h>
+
#include "base/logging.h"
#include "base/string_util.h"
@@ -190,7 +192,15 @@
if (hr == INET_E_TERMINATED_BIND) {
// Check if the content type is CF's mime type.
UINT cf_format = ::RegisterClipboardFormatW(kChromeMimeType);
- if (format_etc->cfFormat == cf_format) {
+ bool override_bind_results = (format_etc->cfFormat == cf_format);
+ if (!override_bind_results) {
+ ScopedComPtr<IBrowserService> browser_service;
+ DoQueryService(SID_SShellBrowser, delegate_, browser_service.Receive());
+ override_bind_results = (browser_service != NULL) &&
+ CheckForCFNavigation(browser_service, false);
+ }
+
+ if (override_bind_results) {
// We want to complete fetching the entire document even though the
// delegate isn't interested in continuing.
// This happens when we switch from mshtml to CF.