OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef SYNC_INTERNAL_API_PUBLIC_BASE_CANCELATION_SIGNAL_H_ | 5 #ifndef COMPONENTS_SYNC_BASE_CANCELATION_SIGNAL_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_BASE_CANCELATION_SIGNAL_H_ | 6 #define COMPONENTS_SYNC_BASE_CANCELATION_SIGNAL_H_ |
7 | 7 |
8 #include "base/synchronization/lock.h" | 8 #include "base/synchronization/lock.h" |
9 #include "sync/base/sync_export.h" | 9 #include "components/sync/base/sync_export.h" |
10 | 10 |
11 namespace syncer { | 11 namespace syncer { |
12 | 12 |
13 class CancelationObserver; | 13 class CancelationObserver; |
14 | 14 |
15 // This class is used to allow one thread to request that another abort and | 15 // This class is used to allow one thread to request that another abort and |
16 // return early. | 16 // return early. |
17 // | 17 // |
18 // The signalling thread owns this class and my call Signal() at any time. | 18 // The signalling thread owns this class and my call Signal() at any time. |
19 // After that call, this class' IsSignalled() will always return true. The | 19 // After that call, this class' IsSignalled() will always return true. The |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 // True if Signal() has been invoked. | 63 // True if Signal() has been invoked. |
64 bool signalled_; | 64 bool signalled_; |
65 | 65 |
66 // The registered abort handler. May be NULL. | 66 // The registered abort handler. May be NULL. |
67 CancelationObserver* handler_; | 67 CancelationObserver* handler_; |
68 }; | 68 }; |
69 | 69 |
70 } // namespace syncer | 70 } // namespace syncer |
71 | 71 |
72 #endif // SYNC_INTERNAL_API_PUBLIC_BASE_CANCELATION_SIGNAL_H_ | 72 #endif // COMPONENTS_SYNC_BASE_CANCELATION_SIGNAL_H_ |
OLD | NEW |