| Index: chrome/app/chrome_breakpad_client.cc
|
| diff --git a/chrome/app/chrome_breakpad_client.cc b/chrome/app/chrome_breakpad_client.cc
|
| index 81c25ef97c9f1bf37140aaed2e38793b7a1df0bb..fa759a08b0ff85de51aa33cde7ad178b2623d93c 100644
|
| --- a/chrome/app/chrome_breakpad_client.cc
|
| +++ b/chrome/app/chrome_breakpad_client.cc
|
| @@ -4,11 +4,19 @@
|
|
|
| #include "chrome/app/chrome_breakpad_client.h"
|
|
|
| +#include "base/command_line.h"
|
| #include "base/environment.h"
|
| #include "base/files/file_path.h"
|
| +#include "base/logging.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/path_service.h"
|
| +#include "base/strings/utf_string_conversions.h"
|
| #include "chrome/common/chrome_paths.h"
|
| +#include "chrome/common/chrome_switches.h"
|
| +
|
| +#if defined(OS_WIN)
|
| +#include "base/file_version_info.h"
|
| +#endif
|
|
|
| #if defined(OS_POSIX)
|
| #include "chrome/common/dump_without_crashing.h"
|
| @@ -34,6 +42,39 @@ bool ChromeBreakpadClient::GetAlternativeCrashDumpLocation(
|
|
|
| return false;
|
| }
|
| +
|
| +void ChromeBreakpadClient::GetProductNameAndVersion(
|
| + const base::FilePath& exe_path,
|
| + base::string16* product_name,
|
| + base::string16* version,
|
| + base::string16* special_build) {
|
| + DCHECK(product_name);
|
| + DCHECK(version);
|
| + DCHECK(special_build);
|
| +
|
| + scoped_ptr<FileVersionInfo> version_info(
|
| + FileVersionInfo::CreateFileVersionInfo(exe_path));
|
| +
|
| + if (version_info.get()) {
|
| + // Get the information from the file.
|
| + *version = version_info->product_version();
|
| + if (!version_info->is_official_build())
|
| + version->append(base::ASCIIToUTF16("-devel"));
|
| +
|
| + const CommandLine& command = *CommandLine::ForCurrentProcess();
|
| + if (command.HasSwitch(switches::kChromeFrame)) {
|
| + *product_name = base::ASCIIToUTF16("ChromeFrame");
|
| + } else {
|
| + *product_name = version_info->product_short_name();
|
| + }
|
| +
|
| + *special_build = version_info->special_build();
|
| + } else {
|
| + // No version info found. Make up the values.
|
| + *product_name = base::ASCIIToUTF16("Chrome");
|
| + *version = base::ASCIIToUTF16("0.0.0.0-devel");
|
| + }
|
| +}
|
| #endif
|
|
|
| bool ChromeBreakpadClient::GetCrashDumpLocation(base::FilePath* crash_dir) {
|
|
|