summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_activex.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-14 00:05:52 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-14 00:05:52 +0000
commitc3a97284a8d3a4e1a6784c2c87590957c56fab29 (patch)
tree232c1144cdf53221d9b4842e2d7c4a9eeb5d5658 /chrome_frame/chrome_frame_activex.cc
parentb0dc569d27817cccc7b09108da41054892c35bf7 (diff)
downloadchromium_src-c3a97284a8d3a4e1a6784c2c87590957c56fab29.zip
chromium_src-c3a97284a8d3a4e1a6784c2c87590957c56fab29.tar.gz
chromium_src-c3a97284a8d3a4e1a6784c2c87590957c56fab29.tar.bz2
Another attempt to fix the ChromeFrame InstallFlowTest failures. We need to refresh the user
agent before invoking SetSite on the ChromeFrame BHO to ensure that the protocol sink patch is not disabled. BUG=none TEST=Covered by existing ChromeFrame InstallFlowTest. Review URL: http://codereview.chromium.org/6252004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_activex.cc')
-rw-r--r--chrome_frame/chrome_frame_activex.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome_frame/chrome_frame_activex.cc b/chrome_frame/chrome_frame_activex.cc
index d7f4ef0..c7dcb40 100644
--- a/chrome_frame/chrome_frame_activex.cc
+++ b/chrome_frame/chrome_frame_activex.cc
@@ -682,6 +682,14 @@ HRESULT ChromeFrameActivex::registerBhoIfNeeded() {
return hr;
}
+ hr = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT_REFRESH, NULL, 0, 0);
+ if (FAILED(hr)) {
+ DLOG(ERROR) << "Failed to refresh user agent string from registry. "
+ << "UrlMkSetSessionOption returned "
+ << base::StringPrintf("0x%08x", hr);
+ return hr;
+ }
+
hr = bho->SetSite(web_browser2);
if (FAILED(hr)) {
NOTREACHED() << "ChromeFrame BHO SetSite failed. Error:"
@@ -691,12 +699,5 @@ HRESULT ChromeFrameActivex::registerBhoIfNeeded() {
web_browser2->PutProperty(base::win::ScopedBstr(bho_class_id_as_string),
base::win::ScopedVariant(bho));
-
- hr = UrlMkSetSessionOption(URLMON_OPTION_USERAGENT_REFRESH, NULL, 0, 0);
- if (FAILED(hr)) {
- DLOG(ERROR) << "Failed to refresh user agent string from registry. "
- << "UrlMkSetSessionOption returned "
- << base::StringPrintf("0x%08x", hr);
- }
- return hr;
+ return S_OK;
}