Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: webkit/glue/webkit_glue.cc

Issue 1560027: Refactor FileVersionInfo into an interface with platform implementations. (Closed)
Patch Set: comments Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webkit_glue.h ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webkit_glue.cc
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc
index c3426a6cf1f5315bf345533c0386e76d1a564561..f36a0e28c5c787bf6f1352790de995d15ab6aaf4 100644
--- a/webkit/glue/webkit_glue.cc
+++ b/webkit/glue/webkit_glue.cc
@@ -11,8 +11,8 @@
#include <sys/utsname.h>
#endif
-#include "base/file_version_info.h"
#include "base/logging.h"
+#include "base/scoped_ptr.h"
#include "base/singleton.h"
#include "base/string_piece.h"
#include "base/string_util.h"
@@ -418,20 +418,8 @@ void BuildUserAgent(bool mimic_chrome1, bool mimic_windows,
// Get the product name and version, and replace Safari's Version/X string
// with it. This is done to expose our product name in a manner that is
// maximally compatible with Safari, we hope!!
- std::string product;
-
- if (mimic_chrome1) {
- product = kChrome1ProductString;
- } else {
- scoped_ptr<FileVersionInfo> version_info(
- FileVersionInfo::CreateFileVersionInfoForCurrentModule());
- if (version_info.get()) {
- product = "Chrome/" + WideToASCII(version_info->product_version());
- } else {
- DLOG(WARNING) << "Unknown product version";
- product = "Chrome/0.0.0.0";
- }
- }
+ std::string product = mimic_chrome1 ? kChrome1ProductString
+ : GetProductVersion();
// Derived from Safari's UA string.
StringAppendF(
« no previous file with comments | « webkit/glue/webkit_glue.h ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698