summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_logging.h
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-28 21:08:04 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-28 21:08:04 +0000
commitd55aaa139da94452ebd6812bfa9241ba050978d9 (patch)
treec5fd3ad94b96114b9109fc92610cae3b9688014b /ipc/ipc_logging.h
parent50e8299eb26f3a289c35badb7e740eb109981cd1 (diff)
downloadchromium_src-d55aaa139da94452ebd6812bfa9241ba050978d9.zip
chromium_src-d55aaa139da94452ebd6812bfa9241ba050978d9.tar.gz
chromium_src-d55aaa139da94452ebd6812bfa9241ba050978d9.tar.bz2
Implement about:ipc dialog for Mac.
Convert IPC logging trigger from x-process waitable event to a messages sent to all processes. Review URL: http://codereview.chromium.org/192070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27405 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_logging.h')
-rw-r--r--ipc/ipc_logging.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/ipc/ipc_logging.h b/ipc/ipc_logging.h
index 364ad79..e3bc33e 100644
--- a/ipc/ipc_logging.h
+++ b/ipc/ipc_logging.h
@@ -23,8 +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::WaitableEventWatcher::Delegate,
- public MessageLoop::DestructionObserver {
+class Logging {
public:
// Implemented by consumers of log messages.
class Consumer {
@@ -37,6 +36,10 @@ class Logging : public base::WaitableEventWatcher::Delegate,
~Logging();
static Logging* current();
+ // Enable and Disable are NOT cross-process; they only affect the
+ // current thread/process. If you want to modify the value for all
+ // processes, perhaps your intent is to call
+ // g_browser_process->SetIPCLoggingEnabled().
void Enable();
void Disable();
bool Enabled() const { return enabled_; }
@@ -65,12 +68,6 @@ class Logging : public base::WaitableEventWatcher::Delegate,
static void GetMessageText(uint16 type, std::wstring* name,
const Message* message, std::wstring* params);
- // WaitableEventWatcher::Delegate implementation
- void OnWaitableEventSignaled(base::WaitableEvent* event);
-
- // MessageLoop::DestructionObserver implementation
- void WillDestroyCurrentMessageLoop();
-
typedef void (*LogFunction)(uint16 type,
std::wstring* name,
const Message* msg,
@@ -82,17 +79,11 @@ class Logging : public base::WaitableEventWatcher::Delegate,
friend struct DefaultSingletonTraits<Logging>;
Logging();
- std::wstring GetEventName(int browser_pid, bool enabled);
void OnSendLogs();
void Log(const LogData& data);
- void RegisterWaitForEvent(bool enabled);
-
- base::WaitableEventWatcher watcher_;
-
- scoped_ptr<base::WaitableEvent> logging_event_on_;
- scoped_ptr<base::WaitableEvent> logging_event_off_;
bool enabled_;
+ bool enabled_on_stderr_; // only used on POSIX for now
std::vector<LogData> queued_logs_;
bool queue_invoke_later_pending_;