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

Unified Diff: chrome/common/multi_process_notification.cc

Issue 5970015: Add multi-process notification class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing file Created 9 years, 11 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
Index: chrome/common/multi_process_notification.cc
diff --git a/chrome/common/multi_process_notification.cc b/chrome/common/multi_process_notification.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e97b4fffe53651d447427f6a0894c0eef742321c
--- /dev/null
+++ b/chrome/common/multi_process_notification.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/multi_process_notification.h"
+
+namespace multi_process_notification {
+
+PerformTaskOnNotification::PerformTaskOnNotification(Task* task) : task_(task) {
+}
+
+PerformTaskOnNotification::~PerformTaskOnNotification() {
+}
+
+void PerformTaskOnNotification::OnNotificationReceived(
+ const std::string& name) {
+ task_->Run();
+ task_.reset();
+}
+
+bool PerformTaskOnNotification::WasNotificationCalled() {
+ return task_.get() == NULL;
+}
+
+} // namespace multi_process_notification
+
Mark Mentovai 2011/01/06 17:59:09 Nuke the blank line at EOF.
dmac 2011/01/06 18:22:37 Done.

Powered by Google App Engine
This is Rietveld 408576698