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 virtual ~Observer() {}
26 // Called when a file system mounting has been invoked. For success, the
27 // |error| argument is set to FILE_OK. Otherwise, |error| contains a specific
29 virtual void OnProvidedFileSystemMount(
30 const ProvidedFileSystemInfo
& file_system_info
,
32 base::File::Error error
) = 0;
34 // Called when a file system unmounting has been invoked. For success, the
35 // |error| argument is set to FILE_OK. Otherwise, |error| contains a specific
37 virtual void OnProvidedFileSystemUnmount(
38 const ProvidedFileSystemInfo
& file_system_info
,
39 base::File::Error error
) = 0;
42 } // namespace file_system_provider
43 } // namespace chromeos
45 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_OBSERVER_H_