summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-14 01:46:43 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-14 01:46:43 +0000
commitbcff05af3d60df10a21e07751a14b95ce9e7f3d4 (patch)
tree76d8d3ec6c6c0d9564c675d423907e29607bf253 /chrome/renderer
parent474b2ab8c3b32c07692480aa234f3b2921fe5dd6 (diff)
downloadchromium_src-bcff05af3d60df10a21e07751a14b95ce9e7f3d4.zip
chromium_src-bcff05af3d60df10a21e07751a14b95ce9e7f3d4.tar.gz
chromium_src-bcff05af3d60df10a21e07751a14b95ce9e7f3d4.tar.bz2
Refactor FileVersionInfo into an interface with platform implementations.
This allows us to move the chrome specific version informaton used by Linux into src/chrome. Add a GetChromeVersionInfo() for Linux in src/chrome/app/ and make sure to use this in src/chrome. In src/webkit/glue, add a new glue method for getting the product version. When compiling chrome, use an implementation in src/chrome/renderer (which uses GetChromeVersionInfo()) and a stub implementation for test_shell. Review URL: http://codereview.chromium.org/1560027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/renderer_glue.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc
index bf879be18..c2b4d0d 100644
--- a/chrome/renderer/renderer_glue.cc
+++ b/chrome/renderer/renderer_glue.cc
@@ -15,7 +15,10 @@
#include "app/clipboard/clipboard.h"
#include "app/clipboard/scoped_clipboard_writer.h"
#include "app/resource_bundle.h"
+#include "base/file_version_info.h"
+#include "base/ref_counted.h"
#include "base/string_util.h"
+#include "chrome/app/chrome_version_info.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/socket_stream_dispatcher.h"
@@ -265,4 +268,13 @@ void SetCacheMode(bool enabled) {
RenderThread::current()->SetCacheMode(enabled);
}
+std::string GetProductVersion() {
+ scoped_ptr<FileVersionInfo> version_info(
+ chrome_app::GetChromeVersionInfo());
+ std::string product("Chrome/");
+ product += version_info.get() ? WideToASCII(version_info->product_version())
+ : "0.0.0.0";
+ return product;
+}
+
} // namespace webkit_glue