Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / chromeos / drive / file_system / operation_observer.h
blob0ac74eb53ea00bac60051315714443ca7cac9ce3
1 // Copyright (c) 2012 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_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_
8 namespace base {
9 class FilePath;
12 namespace drive {
13 namespace file_system {
15 // Error type of sync client.
16 enum DriveSyncErrorType {
17 // Request to delete a file without permission.
18 DRIVE_SYNC_ERROR_DELETE_WITHOUT_PERMISSION,
19 // Google Drive is temporary unavailable.
20 DRIVE_SYNC_ERROR_SERVICE_UNAVAILABLE,
23 // Passes notifications from Drive operations back to the file system.
24 class OperationObserver {
25 public:
26 // Sent when a content of a directory has been changed.
27 // |directory_path| is a virtual directory path representing the
28 // changed directory.
29 virtual void OnDirectoryChangedByOperation(
30 const base::FilePath& directory_path) = 0;
32 // Sent when a cache file is modified and upload is needed.
33 virtual void OnCacheFileUploadNeededByOperation(
34 const std::string& local_id) = 0;
36 // Sent when metadata entry is updated and sync is needed.
37 virtual void OnEntryUpdatedByOperation(const std::string& local_id) {}
39 // Sent when a specific drive sync error occurred.
40 // |local_id| is the local ID of the resource entry.
41 virtual void OnDriveSyncError(DriveSyncErrorType type,
42 const std::string& local_id) {}
45 } // namespace file_system
46 } // namespace drive
48 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_