Index: chrome/common/chrome_version_info.cc |
diff --git a/chrome/common/chrome_version_info.cc b/chrome/common/chrome_version_info.cc |
index 5157c4a4e3a81c6790b4974e33977a4393f9cacf..16999f115c543fc27d708f6d965e20243182c526 100644 |
--- a/chrome/common/chrome_version_info.cc |
+++ b/chrome/common/chrome_version_info.cc |
@@ -9,12 +9,13 @@ |
#include "base/string_util.h" |
#include "base/thread_restrictions.h" |
#include "build/build_config.h" |
+#include "chrome/common/chrome_constants.h" |
namespace chrome { |
#if defined(OS_WIN) || defined(OS_MACOSX) |
-// On Windows and Mac, we get the Chrome version info by querying |
-// FileVersionInfo for the current module. |
+// On Windows and Mac we get the Chrome version info by querying FileVersionInfo |
+// for the current module. |
VersionInfo::VersionInfo() { |
// The current module is already loaded in memory, so this will be cheap. |
@@ -25,31 +26,20 @@ VersionInfo::VersionInfo() { |
VersionInfo::~VersionInfo() { |
} |
-bool VersionInfo::is_valid() const { |
- return version_info_.get() != NULL; |
-} |
- |
std::string VersionInfo::Name() const { |
- if (!is_valid()) |
- return std::string(); |
- return WideToASCII(version_info_->product_name()); |
+ std::wstring name = version_info_->product_name(); |
+ return WideToASCII(name); |
} |
std::string VersionInfo::Version() const { |
- if (!is_valid()) |
- return std::string(); |
return WideToASCII(version_info_->product_version()); |
} |
std::string VersionInfo::LastChange() const { |
- if (!is_valid()) |
- return std::string(); |
return WideToASCII(version_info_->last_change()); |
} |
bool VersionInfo::IsOfficialBuild() const { |
- if (!is_valid()) |
- return false; |
return version_info_->is_official_build(); |
} |
@@ -65,10 +55,6 @@ VersionInfo::VersionInfo() { |
VersionInfo::~VersionInfo() { |
} |
-bool VersionInfo::is_valid() const { |
- return true; |
-} |
- |
std::string VersionInfo::Name() const { |
return PRODUCT_NAME; |
} |