| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/app/breakpad_win.h" | 5 #include "chrome/app/breakpad_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 #include <tchar.h> | 9 #include <tchar.h> |
| 10 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // Returns the custom info structure based on the dll in parameter and the | 90 // Returns the custom info structure based on the dll in parameter and the |
| 91 // process type. | 91 // process type. |
| 92 google_breakpad::CustomClientInfo* GetCustomInfo(const std::wstring& dll_path, | 92 google_breakpad::CustomClientInfo* GetCustomInfo(const std::wstring& dll_path, |
| 93 const std::wstring& type) { | 93 const std::wstring& type) { |
| 94 scoped_ptr<FileVersionInfo> | 94 scoped_ptr<FileVersionInfo> |
| 95 version_info(FileVersionInfo::CreateFileVersionInfo(dll_path)); | 95 version_info(FileVersionInfo::CreateFileVersionInfo(dll_path)); |
| 96 | 96 |
| 97 std::wstring version, product; | 97 std::wstring version, product; |
| 98 if (version_info.get()) { | 98 if (version_info.get()) { |
| 99 // Get the information from the file. | 99 // Get the information from the file. |
| 100 product = version_info->product_short_name(); | |
| 101 version = version_info->product_version(); | 100 version = version_info->product_version(); |
| 102 if (!version_info->is_official_build()) | 101 if (!version_info->is_official_build()) |
| 103 version.append(L"-devel"); | 102 version.append(L"-devel"); |
| 103 |
| 104 const CommandLine& command = *CommandLine::ForCurrentProcess(); |
| 105 if (command.HasSwitch(switches::kChromeFrame)) { |
| 106 product = L"ChromeFrame"; |
| 107 } else { |
| 108 product = version_info->product_short_name(); |
| 109 } |
| 104 } else { | 110 } else { |
| 105 // No version info found. Make up the values. | 111 // No version info found. Make up the values. |
| 106 product = L"Chrome"; | 112 product = L"Chrome"; |
| 107 version = L"0.0.0.0-devel"; | 113 version = L"0.0.0.0-devel"; |
| 108 } | 114 } |
| 109 | 115 |
| 110 // We only expect this method to be called once per process. | 116 // We only expect this method to be called once per process. |
| 111 DCHECK(!g_custom_entries); | 117 DCHECK(!g_custom_entries); |
| 112 g_custom_entries = new std::vector<google_breakpad::CustomInfoEntry>; | 118 g_custom_entries = new std::vector<google_breakpad::CustomInfoEntry>; |
| 113 | 119 |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 if (QueueUserWorkItem( | 588 if (QueueUserWorkItem( |
| 583 &InitCrashReporterThread, | 589 &InitCrashReporterThread, |
| 584 info, | 590 info, |
| 585 WT_EXECUTELONGFUNCTION) == 0) { | 591 WT_EXECUTELONGFUNCTION) == 0) { |
| 586 // We failed to queue to the worker pool, initialize in this thread. | 592 // We failed to queue to the worker pool, initialize in this thread. |
| 587 InitCrashReporterThread(info); | 593 InitCrashReporterThread(info); |
| 588 } | 594 } |
| 589 } | 595 } |
| 590 } | 596 } |
| 591 } | 597 } |
| OLD | NEW |