| 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 "components/sync/base/scoped_event_signal.h" | 5 #include "components/sync/base/scoped_event_signal.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/synchronization/waitable_event.h" | 8 #include "base/synchronization/waitable_event.h" |
| 9 | 9 |
| 10 namespace syncer { | 10 namespace syncer { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 event_ = other.event_; | 24 event_ = other.event_; |
| 25 other.event_ = nullptr; | 25 other.event_ = nullptr; |
| 26 return *this; | 26 return *this; |
| 27 } | 27 } |
| 28 | 28 |
| 29 ScopedEventSignal::~ScopedEventSignal() { | 29 ScopedEventSignal::~ScopedEventSignal() { |
| 30 if (event_) | 30 if (event_) |
| 31 event_->Signal(); | 31 event_->Signal(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 bool ScopedEventSignal::IsSignaled() const { |
| 35 return event_->IsSignaled(); |
| 36 } |
| 37 |
| 34 } // namespace syncer | 38 } // namespace syncer |
| OLD | NEW |