Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / chromeos / file_system_provider / observer.h
blob5a86553f3bd5adf15c8eaefd9bd02726c5159096
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_
8 #include <string>
10 #include "base/files/file.h"
12 namespace chromeos {
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.
22 class Observer {
23 public:
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
26 // error code.
27 virtual void OnProvidedFileSystemMount(
28 const ProvidedFileSystemInfo& file_system_info,
29 MountContext context,
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
34 // error code.
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_