| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_TOOLS_CRASH_SERVICE_CRASH_SERVICE_H_ | 5 #ifndef CHROME_TOOLS_CRASH_SERVICE_CRASH_SERVICE_H_ |
| 6 #define CHROME_TOOLS_CRASH_SERVICE_CRASH_SERVICE_H_ | 6 #define CHROME_TOOLS_CRASH_SERVICE_CRASH_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // page in the crash server. This should be a 25 chars or less string. | 55 // page in the crash server. This should be a 25 chars or less string. |
| 56 // The default tag if not specified is 'crash svc'. | 56 // The default tag if not specified is 'crash svc'. |
| 57 static const char kReporterTag[]; | 57 static const char kReporterTag[]; |
| 58 // --dumps-dir=<directory-path> | 58 // --dumps-dir=<directory-path> |
| 59 // Override the directory to which crash dump files will be written. | 59 // Override the directory to which crash dump files will be written. |
| 60 static const char kDumpsDir[]; | 60 static const char kDumpsDir[]; |
| 61 // --pipe-name=<string> | 61 // --pipe-name=<string> |
| 62 // Override the name of the Windows named pipe on which we will | 62 // Override the name of the Windows named pipe on which we will |
| 63 // listen for crash dump request messages. | 63 // listen for crash dump request messages. |
| 64 static const char kPipeName[]; | 64 static const char kPipeName[]; |
| 65 // --archive-dumps-by-pid |
| 66 // Archive crash dumps into separate directory by client process id. |
| 67 static const char kArchiveDumpsByPid[]; |
| 65 | 68 |
| 66 // Returns number of crash dumps handled. | 69 // Returns number of crash dumps handled. |
| 67 int requests_handled() const { | 70 int requests_handled() const { |
| 68 return requests_handled_; | 71 return requests_handled_; |
| 69 } | 72 } |
| 70 // Returns number of crash clients registered. | 73 // Returns number of crash clients registered. |
| 71 int clients_connected() const { | 74 int clients_connected() const { |
| 72 return clients_connected_; | 75 return clients_connected_; |
| 73 } | 76 } |
| 74 // Returns number of crash clients terminated. | 77 // Returns number of crash clients terminated. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 95 | 98 |
| 96 // This routine sends the crash dump to the server. It takes the sending_ | 99 // This routine sends the crash dump to the server. It takes the sending_ |
| 97 // lock when it is performing the send. | 100 // lock when it is performing the send. |
| 98 static unsigned long __stdcall AsyncSendDump(void* context); | 101 static unsigned long __stdcall AsyncSendDump(void* context); |
| 99 | 102 |
| 100 // Returns the security descriptor which access to low integrity processes | 103 // Returns the security descriptor which access to low integrity processes |
| 101 // The caller is supposed to free the security descriptor by calling | 104 // The caller is supposed to free the security descriptor by calling |
| 102 // LocalFree. | 105 // LocalFree. |
| 103 PSECURITY_DESCRIPTOR GetSecurityDescriptorForLowIntegrity(); | 106 PSECURITY_DESCRIPTOR GetSecurityDescriptorForLowIntegrity(); |
| 104 | 107 |
| 108 // Whether to archive crash dumps by client process id. |
| 109 static bool archive_dumps_by_pid_; |
| 110 |
| 105 google_breakpad::CrashGenerationServer* dumper_; | 111 google_breakpad::CrashGenerationServer* dumper_; |
| 106 google_breakpad::CrashReportSender* sender_; | 112 google_breakpad::CrashReportSender* sender_; |
| 107 | 113 |
| 108 // the path to dumps and logs directory. | 114 // the path to dumps and logs directory. |
| 109 FilePath report_path_; | 115 FilePath report_path_; |
| 110 // the extra tag sent to the server with each dump. | 116 // the extra tag sent to the server with each dump. |
| 111 std::wstring reporter_tag_; | 117 std::wstring reporter_tag_; |
| 112 | 118 |
| 113 // clients serviced statistics: | 119 // clients serviced statistics: |
| 114 int requests_handled_; | 120 int requests_handled_; |
| 115 int requests_sent_; | 121 int requests_sent_; |
| 116 volatile long clients_connected_; | 122 volatile long clients_connected_; |
| 117 volatile long clients_terminated_; | 123 volatile long clients_terminated_; |
| 118 base::Lock sending_; | 124 base::Lock sending_; |
| 119 | 125 |
| 120 DISALLOW_COPY_AND_ASSIGN(CrashService); | 126 DISALLOW_COPY_AND_ASSIGN(CrashService); |
| 121 }; | 127 }; |
| 122 | 128 |
| 123 #endif // CHROME_TOOLS_CRASH_SERVICE_CRASH_SERVICE_H_ | 129 #endif // CHROME_TOOLS_CRASH_SERVICE_CRASH_SERVICE_H_ |
| OLD | NEW |