summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_automation.cc
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 15:05:02 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-31 15:05:02 +0000
commite67a73f47398a8d89a98abde04f3d4c7695a6d30 (patch)
treeae5652a01e709405ab8fc3c2887b0b96b38ca490 /chrome_frame/chrome_frame_automation.cc
parent22e1168491f768ae6ff20ded07b3063ac5fe34db (diff)
downloadchromium_src-e67a73f47398a8d89a98abde04f3d4c7695a6d30.zip
chromium_src-e67a73f47398a8d89a98abde04f3d4c7695a6d30.tar.gz
chromium_src-e67a73f47398a8d89a98abde04f3d4c7695a6d30.tar.bz2
When GCF is the default renderer, use Chrome's User-agent header instead of IE's.
TEST=Set IsDefaultRenderer to 1 (REG_DWORD) under the ChromeFrame registry key. Check if the User agent header in requests is the Chrome user agent. Then set the value to 0 and make sure the regular user-agent header is there. BUG=50788 Review URL: http://codereview.chromium.org/3130016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57991 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r--chrome_frame/chrome_frame_automation.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc
index aa89256..32fc24d 100644
--- a/chrome_frame/chrome_frame_automation.cc
+++ b/chrome_frame/chrome_frame_automation.cc
@@ -209,8 +209,11 @@ AutomationProxyCacheEntry::AutomationProxyCacheEntry(
DCHECK(delegate);
thread_.reset(new base::Thread(WideToASCII(profile_name).c_str()));
thread_->Start();
+ // Use scoped_refptr so that the params will get released when the task
+ // has been run.
+ scoped_refptr<ChromeFrameLaunchParams> ref_params(params);
thread_->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(this,
- &AutomationProxyCacheEntry::CreateProxy, params, delegate));
+ &AutomationProxyCacheEntry::CreateProxy, ref_params, delegate));
}
AutomationProxyCacheEntry::~AutomationProxyCacheEntry() {
@@ -408,7 +411,7 @@ void AutomationProxyCacheEntry::SendUMAData() {
}
if (!proxy_.get()) {
- NOTREACHED() << __FUNCTION__ << " Invalid proxy entry";
+ DLOG(WARNING) << __FUNCTION__ << " NULL proxy, can't send UMA data";
} else {
ChromeFrameHistogramSnapshots::HistogramPickledList histograms =
snapshots_->GatherAllHistograms();