summaryrefslogtreecommitdiffstats
path: root/chrome_frame/metrics_service.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 23:18:10 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-27 23:18:10 +0000
commite0a2628fb0a29dda51c5dfe5fbd8563d068f1cc2 (patch)
treee021bb22757570cf942bcf82a6e61cb3be48c7d5 /chrome_frame/metrics_service.cc
parentab08260d36bbcea95b1010b5e7eae79c12f45dcd (diff)
downloadchromium_src-e0a2628fb0a29dda51c5dfe5fbd8563d068f1cc2.zip
chromium_src-e0a2628fb0a29dda51c5dfe5fbd8563d068f1cc2.tar.gz
chromium_src-e0a2628fb0a29dda51c5dfe5fbd8563d068f1cc2.tar.bz2
Add ChromeFrame to the useragent string in outgoing UMA requests from ChromeFrame.
Should fix bug http://code.google.com/p/chromium/issues/detail?id=53648 Bug=53648 Review URL: http://codereview.chromium.org/3273002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57750 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/metrics_service.cc')
-rw-r--r--chrome_frame/metrics_service.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome_frame/metrics_service.cc b/chrome_frame/metrics_service.cc
index 9258112..c144152 100644
--- a/chrome_frame/metrics_service.cc
+++ b/chrome_frame/metrics_service.cc
@@ -60,6 +60,8 @@
#include "chrome/installer/util/google_update_settings.h"
#include "chrome_frame/bind_status_callback_impl.h"
#include "chrome_frame/crash_reporting/crash_metrics.h"
+#include "chrome_frame/html_utils.h"
+#include "chrome_frame/http_negotiate.h"
#include "chrome_frame/utils.h"
#include "net/base/upload_data.h"
#include "chrome_frame/urlmon_bind_status_callback.h"
@@ -174,11 +176,19 @@ class ChromeFrameMetricsDataUploader : public BSCBImpl {
base::Int64ToString(upload_data_size_).c_str());
new_headers += kMetricsType;
+ std::string user_agent_value = http_utils::GetDefaultUserAgent();
+ user_agent_value = http_utils::AddChromeFrameToUserAgentValue(
+ user_agent_value);
+
+ new_headers += "User-Agent: " + user_agent_value;
+ new_headers += "\r\n";
+
*additional_headers = reinterpret_cast<wchar_t*>(
CoTaskMemAlloc((new_headers.size() + 1) * sizeof(wchar_t)));
lstrcpynW(*additional_headers, ASCIIToWide(new_headers).c_str(),
new_headers.size());
+
return BSCBImpl::BeginningTransaction(url, headers, reserved,
additional_headers);
}