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

Unified Diff: chrome/common/ipc_logging.h

Issue 20156: POSIX: basic IPC logging (Closed)
Patch Set: Merge jrg's xcode changes Created 11 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/ipc_channel_proxy.cc ('k') | chrome/common/ipc_logging.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/ipc_logging.h
diff --git a/chrome/common/ipc_logging.h b/chrome/common/ipc_logging.h
index 5d4016d7596f88fcff00fbd2be9c86b24e63e63d..06a687bc48e9b29edd08d67b37edb3a1db6a303d 100644
--- a/chrome/common/ipc_logging.h
+++ b/chrome/common/ipc_logging.h
@@ -10,8 +10,8 @@
#ifdef IPC_MESSAGE_LOG_ENABLED
#include "base/lock.h"
-#include "base/object_watcher.h"
#include "base/singleton.h"
+#include "base/waitable_event_watcher.h"
#include "chrome/common/ipc_message_utils.h"
class MessageLoop;
@@ -23,7 +23,7 @@ class Message;
// One instance per process. Needs to be created on the main thread (the UI
// thread in the browser) but OnPreDispatchMessage/OnPostDispatchMessage
// can be called on other threads.
-class Logging : public base::ObjectWatcher::Delegate {
+class Logging : public base::WaitableEventWatcher::Delegate {
public:
// Implemented by consumers of log messages.
class Consumer {
@@ -38,7 +38,7 @@ class Logging : public base::ObjectWatcher::Delegate {
void Enable();
void Disable();
- bool inline Enabled() const;
+ bool Enabled() const { return enabled_; }
// Called by child processes to give the logger object the channel to send
// logging data to the browser process.
@@ -64,8 +64,8 @@ class Logging : public base::ObjectWatcher::Delegate {
static void GetMessageText(uint16 type, std::wstring* name,
const Message* message, std::wstring* params);
- // ObjectWatcher::Delegate implementation
- void OnObjectSignaled(HANDLE object);
+ // WaitableEventWatcher::Delegate implementation
+ void OnWaitableEventSignaled(base::WaitableEvent* event);
typedef void (*LogFunction)(uint16 type,
std::wstring* name,
@@ -84,10 +84,10 @@ class Logging : public base::ObjectWatcher::Delegate {
void RegisterWaitForEvent(bool enabled);
- base::ObjectWatcher watcher_;
+ base::WaitableEventWatcher watcher_;
- HANDLE logging_event_on_;
- HANDLE logging_event_off_;
+ scoped_ptr<base::WaitableEvent> logging_event_on_;
+ scoped_ptr<base::WaitableEvent> logging_event_off_;
bool enabled_;
std::vector<LogData> queued_logs_;
« no previous file with comments | « chrome/common/ipc_channel_proxy.cc ('k') | chrome/common/ipc_logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698