| Index: services/media/framework/util/incident.cc
|
| diff --git a/services/media/framework/util/incident.cc b/services/media/framework/util/incident.cc
|
| deleted file mode 100644
|
| index 3b6a1e3602f2306f8097c7da06fcd9290bcdabe6..0000000000000000000000000000000000000000
|
| --- a/services/media/framework/util/incident.cc
|
| +++ /dev/null
|
| @@ -1,54 +0,0 @@
|
| -// Copyright 2016 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 "services/media/framework/util/incident.h"
|
| -
|
| -namespace mojo {
|
| -namespace media {
|
| -
|
| -Incident::Incident() {}
|
| -
|
| -Incident::~Incident() {}
|
| -
|
| -void Incident::Occur() {
|
| - if (occurred_) {
|
| - return;
|
| - }
|
| -
|
| - occurred_ = true;
|
| -
|
| - // Swap out consequences_ in case one of the callbacks deletes this.
|
| - std::vector<std::function<void()>> consequences;
|
| - consequences_.swap(consequences);
|
| -
|
| - for (const std::function<void()>& consequence : consequences) {
|
| - consequence();
|
| - }
|
| -}
|
| -
|
| -ThreadsafeIncident::ThreadsafeIncident() {}
|
| -
|
| -ThreadsafeIncident::~ThreadsafeIncident() {}
|
| -
|
| -void ThreadsafeIncident::Occur() {
|
| - std::vector<std::function<void()>> consequences;
|
| -
|
| - {
|
| - base::AutoLock lock(consequences_lock_);
|
| -
|
| - if (occurred_) {
|
| - return;
|
| - }
|
| -
|
| - occurred_ = true;
|
| - consequences_.swap(consequences);
|
| - }
|
| -
|
| - for (const std::function<void()>& consequence : consequences) {
|
| - consequence();
|
| - }
|
| -}
|
| -
|
| -} // namespace media
|
| -} // namespace mojo
|
|
|