1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OBSERVER_H_
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OBSERVER_H_
10 #include "base/files/file.h"
13 namespace file_system_provider
{
15 class ProvidedFileSystemInfo
;
17 // Context for mounting. Whether happened due to user interaction or after
18 // a reboot, when restoring.
19 enum MountContext
{ MOUNT_CONTEXT_USER
, MOUNT_CONTEXT_RESTORE
};
21 // Observes file_system_provider::Service for mounting and unmounting events.
24 // Called when a file system mounting has been invoked. For success, the
25 // |error| argument is set to FILE_OK. Otherwise, |error| contains a specific
27 virtual void OnProvidedFileSystemMount(
28 const ProvidedFileSystemInfo
& file_system_info
,
30 base::File::Error error
) = 0;
32 // Called when a file system unmounting has been invoked. For success, the
33 // |error| argument is set to FILE_OK. Otherwise, |error| contains a specific
35 virtual void OnProvidedFileSystemUnmount(
36 const ProvidedFileSystemInfo
& file_system_info
,
37 base::File::Error error
) = 0;
40 } // namespace file_system_provider
41 } // namespace chromeos
43 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OBSERVER_H_