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

Side by Side Diff: components/sync/base/scoped_event_signal.cc

Issue 2496723003: [Sync] Signal UIModelWorker to abort on sync shutdown. (Closed)
Patch Set: Address comments + add test. Created 4 years, 1 month 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 "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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698