Chromium Code Reviews| 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.
|