Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Side by Side Diff: services/util/cpp/incident.cc

Issue 2024953003: Motown: Move framework/util/incident* so other services can use it (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698