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

Unified Diff: sync/internal_api/public/base/cancelation_signal.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: sync/internal_api/public/base/cancelation_signal.cc
diff --git a/sync/internal_api/public/base/cancelation_signal.cc b/sync/internal_api/public/base/cancelation_signal.cc
deleted file mode 100644
index 94a479ba5cbdae5e31fb408c2894c4fde0611997..0000000000000000000000000000000000000000
--- a/sync/internal_api/public/base/cancelation_signal.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2013 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 "sync/internal_api/public/base/cancelation_signal.h"
-
-#include "base/logging.h"
-#include "sync/internal_api/public/base/cancelation_observer.h"
-
-namespace syncer {
-
-CancelationSignal::CancelationSignal()
- : signalled_(false),
- handler_(NULL) { }
-
-CancelationSignal::~CancelationSignal() {
- DCHECK(!handler_);
-}
-
-bool CancelationSignal::TryRegisterHandler(CancelationObserver* handler) {
- base::AutoLock lock(signal_lock_);
- DCHECK(!handler_);
-
- if (signalled_)
- return false;
-
- handler_ = handler;
- return true;
-}
-
-void CancelationSignal::UnregisterHandler(CancelationObserver* handler) {
- base::AutoLock lock(signal_lock_);
- DCHECK_EQ(handler_, handler);
- handler_ = NULL;
-}
-
-bool CancelationSignal::IsSignalled() {
- base::AutoLock lock(signal_lock_);
- return signalled_;
-}
-
-void CancelationSignal::Signal() {
- base::AutoLock lock(signal_lock_);
- DCHECK(!signalled_);
-
- signalled_ = true;
- if (handler_) {
- handler_->OnSignalReceived();
- }
-}
-
-} // namespace syncer
« no previous file with comments | « sync/internal_api/public/base/cancelation_signal.h ('k') | sync/internal_api/public/base/cancelation_signal_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698