Some cosmetic/style changes to conform to style guidelines. This time

I waited for the style reviewer to approve all my code so hopefully there
should be no more style related check-ins.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@256 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
doshimun 2008-04-08 19:03:57 +00:00
parent eeca9921c5
commit 05ec557277
2 changed files with 23 additions and 23 deletions

View file

@ -30,34 +30,35 @@
#include "client/windows/crash_generation/crash_generation_server.h" #include "client/windows/crash_generation/crash_generation_server.h"
#include <windows.h> #include <windows.h>
#include <cassert> #include <cassert>
#include <list>
#include "client/windows/common/auto_critical_section.h" #include "client/windows/common/auto_critical_section.h"
#include "processor/scoped_ptr.h" #include "processor/scoped_ptr.h"
namespace google_breakpad { namespace google_breakpad {
// Output buffer size. // Output buffer size.
const size_t kOutBufferSize = 64; static const size_t kOutBufferSize = 64;
// Input buffer size. // Input buffer size.
const size_t kInBufferSize = 64; static const size_t kInBufferSize = 64;
// Access flags for the client on the dump request event. // Access flags for the client on the dump request event.
const DWORD kDumpRequestEventAccess = EVENT_MODIFY_STATE; static const DWORD kDumpRequestEventAccess = EVENT_MODIFY_STATE;
// Access flags for the client on the dump generated event. // Access flags for the client on the dump generated event.
const DWORD kDumpGeneratedEventAccess = EVENT_MODIFY_STATE | static const DWORD kDumpGeneratedEventAccess = EVENT_MODIFY_STATE |
SYNCHRONIZE; SYNCHRONIZE;
// Access flags for the client on the mutex. // Access flags for the client on the mutex.
const DWORD kMutexAccess = SYNCHRONIZE; static const DWORD kMutexAccess = SYNCHRONIZE;
// Attribute flags for the pipe. // Attribute flags for the pipe.
const DWORD kPipeAttr = FILE_FLAG_FIRST_PIPE_INSTANCE | static const DWORD kPipeAttr = FILE_FLAG_FIRST_PIPE_INSTANCE |
PIPE_ACCESS_DUPLEX | PIPE_ACCESS_DUPLEX |
FILE_FLAG_OVERLAPPED; FILE_FLAG_OVERLAPPED;
// Mode for the pipe. // Mode for the pipe.
const DWORD kPipeMode = PIPE_TYPE_MESSAGE | static const DWORD kPipeMode = PIPE_TYPE_MESSAGE |
PIPE_READMODE_MESSAGE | PIPE_READMODE_MESSAGE |
PIPE_WAIT; PIPE_WAIT;
@ -66,19 +67,19 @@ const DWORD kPipeMode = PIPE_TYPE_MESSAGE |
// the code for one of the states of the server state machine and // the code for one of the states of the server state machine and
// the code for all of the states perform async I/O and hence // the code for all of the states perform async I/O and hence
// finish very quickly. // finish very quickly.
const ULONG kPipeIOThreadFlags = WT_EXECUTEINWAITTHREAD; static const ULONG kPipeIOThreadFlags = WT_EXECUTEINWAITTHREAD;
// Dump request threads will, most likely, generate dumps. That may // Dump request threads will, most likely, generate dumps. That may
// take some time to finish, so specify WT_EXECUTELONGFUNCTION flag. // take some time to finish, so specify WT_EXECUTELONGFUNCTION flag.
const ULONG kDumpRequestThreadFlags = WT_EXECUTEINWAITTHREAD | static const ULONG kDumpRequestThreadFlags = WT_EXECUTEINWAITTHREAD |
WT_EXECUTELONGFUNCTION; WT_EXECUTELONGFUNCTION;
// Maximum delay during server shutdown if some work items // Maximum delay during server shutdown if some work items
// are still executing. // are still executing.
const int kShutdownDelayMs = 10000; static const int kShutdownDelayMs = 10000;
// Interval for each sleep during server shutdown. // Interval for each sleep during server shutdown.
const int kShutdownSleepIntervalMs = 5; static const int kShutdownSleepIntervalMs = 5;
static bool IsClientRequestValid(const ProtocolMessage& msg) { static bool IsClientRequestValid(const ProtocolMessage& msg) {
return msg.tag == MESSAGE_TAG_REGISTRATION_REQUEST && return msg.tag == MESSAGE_TAG_REGISTRATION_REQUEST &&
@ -492,8 +493,7 @@ void CrashGenerationServer::HandleReadingAckState() {
connect_callback_(connect_context_, client_info_); connect_callback_(connect_context_, client_info_);
} }
} else { } else {
DWORD error_code; DWORD error_code = GetLastError();
error_code = GetLastError();
// We should never get an I/O incomplete since we should not execute this // We should never get an I/O incomplete since we should not execute this
// unless the Read has finished and the overlapped event is signaled. If // unless the Read has finished and the overlapped event is signaled. If

View file

@ -60,7 +60,7 @@ class CrashGenerationServer {
// Creates an instance with the given parameters. // Creates an instance with the given parameters.
// //
// Parameter pipe_name: Name of the Windows Named pipe // Parameter pipe_name: Name of the Windows named pipe
// Parameter connect_callback: Callback for a new client connection. // Parameter connect_callback: Callback for a new client connection.
// Parameter connect_context: Context for client connection callback. // Parameter connect_context: Context for client connection callback.
// Parameter crash_callback: Callback for a client crash dump request. // Parameter crash_callback: Callback for a client crash dump request.