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

Unified Diff: sync/internal_api/public/base/cancelation_observer.h

Issue 23189021: sync: Gracefully handle very early shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Retry: sync non-blocking early shutdown Created 7 years, 3 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_observer.h
diff --git a/sync/internal_api/public/base/cancelation_observer.h b/sync/internal_api/public/base/cancelation_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..9581004c7502a1485d4ae136bb893fbb935c68cc
--- /dev/null
+++ b/sync/internal_api/public/base/cancelation_observer.h
@@ -0,0 +1,25 @@
+// 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.
+
+#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_CANCELATION_OBSERVER_H_
+#define SYNC_INTERNAL_API_PUBLIC_BASE_CANCELATION_OBSERVER_H_
+
+#include "sync/base/sync_export.h"
+
+namespace syncer {
+
+// Interface for classes that handle signals from the CancelationSignal.
+class SYNC_EXPORT_PRIVATE CancelationObserver {
+ public:
+ CancelationObserver();
+ virtual ~CancelationObserver() = 0;
+
+ // This may be called from a foreign thread while the CancelationSignal's lock
+ // is held. The callee should avoid performing slow or blocking operations.
+ virtual void OnStopRequested() = 0;
+};
+
+} // namespace syncer
+
+#endif // SYNC_INTERNAL_API_PUBLIC_BASE_CANCELATION_OBSERVER_H_
« no previous file with comments | « sync/internal_api/internal_components_factory_impl.cc ('k') | sync/internal_api/public/base/cancelation_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698