OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/common/multi_process_notification.h" |
| 6 |
| 7 #include "base/task.h" |
| 8 |
| 9 namespace multi_process_notification { |
| 10 |
| 11 PerformTaskOnNotification::PerformTaskOnNotification(Task* task) : task_(task) { |
| 12 } |
| 13 |
| 14 PerformTaskOnNotification::~PerformTaskOnNotification() { |
| 15 } |
| 16 |
| 17 void PerformTaskOnNotification::OnNotificationReceived( |
| 18 const std::string& name, Domain domain) { |
| 19 task_->Run(); |
| 20 task_.reset(); |
| 21 } |
| 22 |
| 23 bool PerformTaskOnNotification::WasNotificationReceived() { |
| 24 return task_.get() == NULL; |
| 25 } |
| 26 |
| 27 } // namespace multi_process_notification |
OLD | NEW |