| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 std::wstring shorter(str); | 85 std::wstring shorter(str); |
| 86 return shorter.substr(0, | 86 return shorter.substr(0, |
| 87 google_breakpad::CustomInfoEntry::kValueMaxLength - 1); | 87 google_breakpad::CustomInfoEntry::kValueMaxLength - 1); |
| 88 } | 88 } |
| 89 | 89 |
| 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(FilePath(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 version = version_info->product_version(); | 100 version = version_info->product_version(); |
| 101 if (!version_info->is_official_build()) | 101 if (!version_info->is_official_build()) |
| 102 version.append(L"-devel"); | 102 version.append(L"-devel"); |
| 103 | 103 |
| 104 const CommandLine& command = *CommandLine::ForCurrentProcess(); | 104 const CommandLine& command = *CommandLine::ForCurrentProcess(); |
| 105 if (command.HasSwitch(switches::kChromeFrame)) { | 105 if (command.HasSwitch(switches::kChromeFrame)) { |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 if (QueueUserWorkItem( | 588 if (QueueUserWorkItem( |
| 589 &InitCrashReporterThread, | 589 &InitCrashReporterThread, |
| 590 info, | 590 info, |
| 591 WT_EXECUTELONGFUNCTION) == 0) { | 591 WT_EXECUTELONGFUNCTION) == 0) { |
| 592 // 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. |
| 593 InitCrashReporterThread(info); | 593 InitCrashReporterThread(info); |
| 594 } | 594 } |
| 595 } | 595 } |
| 596 } | 596 } |
| 597 } | 597 } |
| OLD | NEW |