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..8eae60724569b233602e29a566a686d098349df9 |
--- /dev/null |
+++ b/chrome/common/multi_process_notification.cc |
@@ -0,0 +1,27 @@ |
+// 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" |
+ |
+#include "base/task.h" |
+ |
+namespace multi_process_notification { |
+ |
+PerformTaskOnNotification::PerformTaskOnNotification(Task* task) : task_(task) { |
+} |
+ |
+PerformTaskOnNotification::~PerformTaskOnNotification() { |
+} |
+ |
+void PerformTaskOnNotification::OnNotificationReceived( |
+ const std::string& name, Domain domain) { |
+ task_->Run(); |
+ task_.reset(); |
+} |
+ |
+bool PerformTaskOnNotification::WasNotificationReceived() { |
+ return task_.get() == NULL; |
+} |
+ |
+} // namespace multi_process_notification |