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

Unified Diff: components/keyed_service/core/keyed_service_shutdown_notifier.cc

Issue 905703002: Add KeyedServiceShutdownNotifier for classes that depend on keyed services but can't be keyed servi… (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « components/keyed_service/core/keyed_service_shutdown_notifier.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/keyed_service/core/keyed_service_shutdown_notifier.cc
diff --git a/components/keyed_service/core/keyed_service_shutdown_notifier.cc b/components/keyed_service/core/keyed_service_shutdown_notifier.cc
new file mode 100644
index 0000000000000000000000000000000000000000..cb0b27c482ccdae7c7f8c945c84dd31b97fc932a
--- /dev/null
+++ b/components/keyed_service/core/keyed_service_shutdown_notifier.cc
@@ -0,0 +1,20 @@
+// Copyright 2015 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 "components/keyed_service/core/keyed_service_export.h"
+#include "components/keyed_service/core/keyed_service_shutdown_notifier.h"
+
+KeyedServiceShutdownNotifier::KeyedServiceShutdownNotifier() {
+}
+KeyedServiceShutdownNotifier::~KeyedServiceShutdownNotifier() {
+}
+
+scoped_ptr<base::CallbackList<void()>::Subscription>
+KeyedServiceShutdownNotifier::Subscribe(const base::Closure& callback) {
+ return callback_list_.Add(callback);
+}
+
+void KeyedServiceShutdownNotifier::Shutdown() {
+ callback_list_.Notify();
+}
« no previous file with comments | « components/keyed_service/core/keyed_service_shutdown_notifier.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698