From e3ec7c45bd64ef826fd3940c8a2302f5b55edc45 Mon Sep 17 00:00:00 2001 From: erg Date: Wed, 15 Jul 2015 11:30:52 -0700 Subject: mandoline filesystem: Reland "Save cookie data to the mojo:filesystem." In addition to saving the cookies to the file system service (per the previous patch), we also modify the filesystem service to take a client. When the shell connection to the file system service is broken, instead of quitting immediately, we broadcast a shutdown notification to all of our clients, and wait for them to close the directory objects. This solves the timing problems during shutdown. BUG=493311 TBR=shess@chromium.org R=jam@chromium.org,erikwright@chromium.org First Review URL: https://codereview.chromium.org/1179413010 Review URL: https://codereview.chromium.org/1231493002 Cr-Commit-Position: refs/heads/master@{#338888} --- .../network/network_service_delegate_observer.h | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 mojo/services/network/network_service_delegate_observer.h (limited to 'mojo/services/network/network_service_delegate_observer.h') diff --git a/mojo/services/network/network_service_delegate_observer.h b/mojo/services/network/network_service_delegate_observer.h new file mode 100644 index 0000000..d205b67 --- /dev/null +++ b/mojo/services/network/network_service_delegate_observer.h @@ -0,0 +1,24 @@ +// 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. + +#ifndef MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_OBSERVER_H_ +#define MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_OBSERVER_H_ + +namespace mojo { + +// Observer of events on from the NetworkServiceDelegate. +// +// Observers should be registered on the main thread. +class NetworkServiceDelegateObserver { + public: + ~NetworkServiceDelegateObserver() {} + + // Broadcast right before we attempt to shutdown the IO worker thread. This + // is + virtual void OnIOWorkerThreadShutdown() = 0; +}; + +} // namespace mojo + +#endif // MOJO_SERVICES_NETWORK_NETWORK_SERVICE_DELEGATE_OBSERVER_H_ -- cgit v1.1