diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-16 00:30:04 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-16 00:30:04 +0000 |
commit | a542e8259fe093c11a55c2656f1fdd3f76c1a1ee (patch) | |
tree | 27c37c019533c9125c52da4ab2f58d7ab01202c5 /chrome_frame/utils.cc | |
parent | b917bd60404fb8f76860e6db5db95396166f45d9 (diff) | |
download | chromium_src-a542e8259fe093c11a55c2656f1fdd3f76c1a1ee.zip chromium_src-a542e8259fe093c11a55c2656f1fdd3f76c1a1ee.tar.gz chromium_src-a542e8259fe093c11a55c2656f1fdd3f76c1a1ee.tar.bz2 |
Updates for onhttpequiv. Preserving the referrer header, zapping the currently loading document to prevent small documents from executing code.
I'm not enabling httpequiv just yet as there are a couple of things I'm working on related to tests that will break once I make the switch.
TEST=There should be no change since the code isn't still active but run all tests just to be safe.
BUG=none
Review URL: http://codereview.chromium.org/545096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36436 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/utils.cc')
-rw-r--r-- | chrome_frame/utils.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc index af85cb4..67b1217 100644 --- a/chrome_frame/utils.cc +++ b/chrome_frame/utils.cc @@ -636,7 +636,7 @@ bool IsOptInUrl(const wchar_t* url) { } HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker, - IBindCtx* bind_ctx) { + const wchar_t* headers, IBindCtx* bind_ctx) { DCHECK(browser); DCHECK(moniker); DCHECK(bind_ctx); @@ -667,6 +667,10 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker, ScopedComPtr<IUriContainer> uri_container; hr = uri_container.QueryFrom(moniker); + ScopedVariant headers_var; + if (headers && headers[0]) + headers_var.Set(headers); + if (uri_container) { // IE7 and IE8. const IID* interface_ids[] = { @@ -688,8 +692,10 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker, ScopedComPtr<IUri> uri_obj; uri_container->GetIUri(uri_obj.Receive()); DCHECK(uri_obj); - hr = browser_priv2->NavigateWithBindCtx2(uri_obj, NULL, NULL, NULL, NULL, - bind_ctx, NULL); + + hr = browser_priv2->NavigateWithBindCtx2(uri_obj, NULL, NULL, NULL, + headers_var.AsInput(), bind_ctx, + NULL); DLOG_IF(WARNING, FAILED(hr)) << StringPrintf(L"NavigateWithBindCtx2 0x%08X", hr); } @@ -702,7 +708,8 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker, if (SUCCEEDED(hr = browser_priv.QueryFrom(web_browser2))) { ScopedVariant var_url(url); hr = browser_priv->NavigateWithBindCtx(var_url.AsInput(), NULL, NULL, - NULL, NULL, bind_ctx, NULL); + NULL, headers_var.AsInput(), + bind_ctx, NULL); DLOG_IF(WARNING, FAILED(hr)) << StringPrintf(L"NavigateWithBindCtx 0x%08X", hr); } else { |