| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "services/media/framework/util/incident.h" | 5 #include "services/util/cpp/incident.h" |
| 6 | 6 |
| 7 namespace mojo { | 7 namespace mojo { |
| 8 namespace media { | |
| 9 | 8 |
| 10 Incident::Incident() {} | 9 Incident::Incident() {} |
| 11 | 10 |
| 12 Incident::~Incident() {} | 11 Incident::~Incident() {} |
| 13 | 12 |
| 14 void Incident::Occur() { | 13 void Incident::Occur() { |
| 15 if (occurred_) { | 14 if (occurred_) { |
| 16 return; | 15 return; |
| 17 } | 16 } |
| 18 | 17 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 43 | 42 |
| 44 occurred_ = true; | 43 occurred_ = true; |
| 45 consequences_.swap(consequences); | 44 consequences_.swap(consequences); |
| 46 } | 45 } |
| 47 | 46 |
| 48 for (const std::function<void()>& consequence : consequences) { | 47 for (const std::function<void()>& consequence : consequences) { |
| 49 consequence(); | 48 consequence(); |
| 50 } | 49 } |
| 51 } | 50 } |
| 52 | 51 |
| 53 } // namespace media | |
| 54 } // namespace mojo | 52 } // namespace mojo |
| OLD | NEW |