summaryrefslogtreecommitdiffstats
path: root/chrome_frame/renderer_glue.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/renderer_glue.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/renderer_glue.cc')
-rw-r--r--chrome_frame/renderer_glue.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome_frame/renderer_glue.cc b/chrome_frame/renderer_glue.cc
new file mode 100644
index 0000000..8980e97
--- /dev/null
+++ b/chrome_frame/renderer_glue.cc
@@ -0,0 +1,21 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/chrome_version_info.h"
+
+namespace webkit_glue {
+
+// This function is called from BuildUserAgent so we have our own version
+// here instead of pulling in the whole renderer lib where this function
+// is implemented for Chrome.
+std::string GetProductVersion() {
+ chrome::VersionInfo version_info;
+ std::string product("Chrome/");
+ product += version_info.is_valid() ? version_info.Version()
+ : "0.0.0.0";
+ return product;
+}
+
+} // end namespace webkit_glue
+