Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Side by Side Diff: chrome/app/breakpad_win.cc

Issue 345036: Rewrite of chrome.exe startup code... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/app/chrome_exe_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include <vector> 10 #include <vector>
11 11
12 #include "base/base_switches.h" 12 #include "base/base_switches.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/file_util.h" 14 #include "base/file_util.h"
15 #include "base/file_version_info.h" 15 #include "base/file_version_info.h"
16 #include "base/registry.h" 16 #include "base/registry.h"
17 #include "base/string_util.h" 17 #include "base/string_util.h"
18 #include "base/win_util.h" 18 #include "base/win_util.h"
19 #include "chrome/app/google_update_client.h"
20 #include "chrome/app/hard_error_handler_win.h" 19 #include "chrome/app/hard_error_handler_win.h"
21 #include "chrome/common/env_vars.h" 20 #include "chrome/common/env_vars.h"
22 #include "chrome/common/result_codes.h" 21 #include "chrome/common/result_codes.h"
23 #include "chrome/installer/util/install_util.h" 22 #include "chrome/installer/util/install_util.h"
24 #include "chrome/installer/util/google_update_settings.h" 23 #include "chrome/installer/util/google_update_settings.h"
25 #include "breakpad/src/client/windows/handler/exception_handler.h" 24 #include "breakpad/src/client/windows/handler/exception_handler.h"
26 25
27 namespace { 26 namespace {
28 27
29 const wchar_t kGoogleUpdatePipeName[] = L"\\\\.\\pipe\\GoogleCrashServices\\"; 28 const wchar_t kGoogleUpdatePipeName[] = L"\\\\.\\pipe\\GoogleCrashServices\\";
(...skipping 16 matching lines...) Expand all
46 // breakpad's CustomInfoEntry raises an invalid_parameter error if the string 45 // breakpad's CustomInfoEntry raises an invalid_parameter error if the string
47 // we want to set is longer. 46 // we want to set is longer.
48 std::wstring TrimToBreakpadMax(const std::wstring& str) { 47 std::wstring TrimToBreakpadMax(const std::wstring& str) {
49 std::wstring shorter(str); 48 std::wstring shorter(str);
50 return shorter.substr(0, 49 return shorter.substr(0,
51 google_breakpad::CustomInfoEntry::kValueMaxLength - 1); 50 google_breakpad::CustomInfoEntry::kValueMaxLength - 1);
52 } 51 }
53 52
54 // Returns the custom info structure based on the dll in parameter and the 53 // Returns the custom info structure based on the dll in parameter and the
55 // process type. 54 // process type.
56 static google_breakpad::CustomClientInfo* custom_info = NULL;
57 google_breakpad::CustomClientInfo* GetCustomInfo(const std::wstring& dll_path, 55 google_breakpad::CustomClientInfo* GetCustomInfo(const std::wstring& dll_path,
58 const std::wstring& type) { 56 const std::wstring& type) {
59 scoped_ptr<FileVersionInfo> 57 scoped_ptr<FileVersionInfo>
60 version_info(FileVersionInfo::CreateFileVersionInfo(dll_path)); 58 version_info(FileVersionInfo::CreateFileVersionInfo(dll_path));
61 59
62 std::wstring version, product; 60 std::wstring version, product;
63 if (version_info.get()) { 61 if (version_info.get()) {
64 // Get the information from the file. 62 // Get the information from the file.
65 product = version_info->product_short_name(); 63 product = version_info->product_short_name();
66 version = version_info->product_version(); 64 version = version_info->product_version();
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 if (QueueUserWorkItem( 372 if (QueueUserWorkItem(
375 &InitCrashReporterThread, 373 &InitCrashReporterThread,
376 info.release(), 374 info.release(),
377 WT_EXECUTELONGFUNCTION) == 0) { 375 WT_EXECUTELONGFUNCTION) == 0) {
378 // We failed to queue to the worker pool, initialize in this thread. 376 // We failed to queue to the worker pool, initialize in this thread.
379 InitCrashReporterThread(info.release()); 377 InitCrashReporterThread(info.release());
380 } 378 }
381 } 379 }
382 } 380 }
383 } 381 }
OLDNEW
« no previous file with comments | « no previous file | chrome/app/chrome_exe_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698