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

Unified Diff: chrome/common/ipc_logging.h

Issue 28154: Make IPC::Logging register to watch for message loop destruction. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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/browser/browser_uitest.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
===================================================================
--- chrome/common/ipc_logging.h (revision 10364)
+++ chrome/common/ipc_logging.h (working copy)
@@ -10,6 +10,7 @@
#ifdef IPC_MESSAGE_LOG_ENABLED
#include "base/lock.h"
+#include "base/message_loop.h"
#include "base/singleton.h"
#include "base/waitable_event_watcher.h"
#include "chrome/common/ipc_message_utils.h"
@@ -23,7 +24,8 @@
// 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 {
+class Logging : public base::WaitableEventWatcher::Delegate,
+ public MessageLoop::DestructionObserver {
public:
// Implemented by consumers of log messages.
class Consumer {
@@ -67,6 +69,9 @@
// WaitableEventWatcher::Delegate implementation
void OnWaitableEventSignaled(base::WaitableEvent* event);
+ // MessageLoop::DestructionObserver implementation
+ void WillDestroyCurrentMessageLoop();
+
typedef void (*LogFunction)(uint16 type,
std::wstring* name,
const Message* msg,
« no previous file with comments | « chrome/browser/browser_uitest.cc ('k') | chrome/common/ipc_logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698