OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 <windows.h> | 5 #include <windows.h> |
6 #include <sddl.h> | 6 #include <sddl.h> |
7 | 7 |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 #ifdef KASKO | 237 #ifdef KASKO |
238 void DumpHungBrowserProcess(DWORD main_thread_id, | 238 void DumpHungBrowserProcess(DWORD main_thread_id, |
239 const base::string16& channel, | 239 const base::string16& channel, |
240 const base::Process& process) { | 240 const base::Process& process) { |
241 // TODO(erikwright): Rather than recreating these crash keys here, it would be | 241 // TODO(erikwright): Rather than recreating these crash keys here, it would be |
242 // ideal to read them directly from the browser process. | 242 // ideal to read them directly from the browser process. |
243 | 243 |
244 // This is looking up the version of chrome_watcher.dll, which is equivalent | 244 // This is looking up the version of chrome_watcher.dll, which is equivalent |
245 // for our purposes to chrome.dll. | 245 // for our purposes to chrome.dll. |
246 scoped_ptr<FileVersionInfo> version_info( | 246 scoped_ptr<FileVersionInfo> version_info( |
247 FileVersionInfo::CreateFileVersionInfoForModule( | 247 CREATE_FILE_VERSION_INFO_FOR_CURRENT_MODULE()); |
248 reinterpret_cast<HMODULE>(&__ImageBase))); | |
249 using CrashKeyStrings = std::pair<base::string16, base::string16>; | 248 using CrashKeyStrings = std::pair<base::string16, base::string16>; |
250 std::vector<CrashKeyStrings> crash_key_strings; | 249 std::vector<CrashKeyStrings> crash_key_strings; |
251 if (version_info.get()) { | 250 if (version_info.get()) { |
252 crash_key_strings.push_back( | 251 crash_key_strings.push_back( |
253 CrashKeyStrings(L"prod", version_info->product_short_name())); | 252 CrashKeyStrings(L"prod", version_info->product_short_name())); |
254 base::string16 version = version_info->product_version(); | 253 base::string16 version = version_info->product_version(); |
255 if (!version_info->is_official_build()) | 254 if (!version_info->is_official_build()) |
256 version.append(base::ASCIIToUTF16("-devel")); | 255 version.append(base::ASCIIToUTF16("-devel")); |
257 crash_key_strings.push_back(CrashKeyStrings(L"ver", version)); | 256 crash_key_strings.push_back(CrashKeyStrings(L"ver", version)); |
258 } else { | 257 } else { |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 | 428 |
430 // Wind logging down. | 429 // Wind logging down. |
431 logging::LogEventProvider::Uninitialize(); | 430 logging::LogEventProvider::Uninitialize(); |
432 | 431 |
433 return 0; | 432 return 0; |
434 } | 433 } |
435 | 434 |
436 static_assert( | 435 static_assert( |
437 base::is_same<decltype(&WatcherMain), ChromeWatcherMainFunction>::value, | 436 base::is_same<decltype(&WatcherMain), ChromeWatcherMainFunction>::value, |
438 "WatcherMain() has wrong type"); | 437 "WatcherMain() has wrong type"); |
OLD | NEW |