// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef STORAGE_BROWSER_FILE_SYSTEM_COPY_OR_MOVE_HOOK_DELEGATE_COMPOSITE_H_ #define STORAGE_BROWSER_FILE_SYSTEM_COPY_OR_MOVE_HOOK_DELEGATE_COMPOSITE_H_ #include <memory> #include "base/functional/callback.h" #include "base/memory/weak_ptr.h" #include "storage/browser/file_system/copy_or_move_hook_delegate.h" namespace storage { // Manages multiple CopyOrMoveDelegate instances and runs the same method on all // of them if it is called on this. This class takes the ownership of the other // instances. // The saved instances are always called in the same order as they were added. // For methods with StatusCallback all instances are called even if an error // occurs. The callback of the composite is called with the first error (order // of execution) or with File::FILE_OK if no error occurred. class COMPONENT_EXPORT(STORAGE_BROWSER) CopyOrMoveHookDelegateComposite : public CopyOrMoveHookDelegate { … }; } // namespace storage #endif // STORAGE_BROWSER_FILE_SYSTEM_COPY_OR_MOVE_HOOK_DELEGATE_COMPOSITE_H_