Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Side by Side Diff: chrome/browser/chromeos/drive/file_system/operation_observer.h

Issue 343073003: Files.app: Provide detailed change information on onDirectoryChanged event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_
7 7
8 namespace base { 8 namespace base {
9 class FilePath; 9 class FilePath;
10 } 10 }
11 11
12 namespace drive { 12 namespace drive {
13 class FileChange;
14
13 namespace file_system { 15 namespace file_system {
14 16
15 // Error type of sync client. 17 // Error type of sync client.
16 // Keep it synced with "DriveSyncErrorType" in file_manager_private.idl. 18 // Keep it synced with "DriveSyncErrorType" in file_manager_private.idl.
17 enum DriveSyncErrorType { 19 enum DriveSyncErrorType {
18 // Request to delete a file without permission. 20 // Request to delete a file without permission.
19 DRIVE_SYNC_ERROR_DELETE_WITHOUT_PERMISSION, 21 DRIVE_SYNC_ERROR_DELETE_WITHOUT_PERMISSION,
20 // Google Drive is temporary unavailable. 22 // Google Drive is temporary unavailable.
21 DRIVE_SYNC_ERROR_SERVICE_UNAVAILABLE, 23 DRIVE_SYNC_ERROR_SERVICE_UNAVAILABLE,
22 // Errors other than above ones. No fallback is provided for the error. 24 // Errors other than above ones. No fallback is provided for the error.
23 DRIVE_SYNC_ERROR_MISC, 25 DRIVE_SYNC_ERROR_MISC,
24 }; 26 };
25 27
26 // Passes notifications from Drive operations back to the file system. 28 // Passes notifications from Drive operations back to the file system.
27 class OperationObserver { 29 class OperationObserver {
28 public: 30 public:
29 // Sent when a content of a directory has been changed. 31 // Sent when a content of a directory has been changed.
30 // |directory_path| is a virtual directory path representing the 32 // |directory_path| is a virtual directory path representing the
31 // changed directory. 33 // changed directory.
32 virtual void OnDirectoryChangedByOperation( 34 virtual void OnDirectoryChangedByOperation(
kinaba 2014/06/23 05:37:43 The "Directory" in the name might better be change
yoshiki 2014/06/24 02:02:22 Done.
33 const base::FilePath& directory_path) = 0; 35 const FileChange& changed_files) = 0;
34 36
35 // Sent when an entry is updated and sync is needed. 37 // Sent when an entry is updated and sync is needed.
36 virtual void OnEntryUpdatedByOperation(const std::string& local_id) {} 38 virtual void OnEntryUpdatedByOperation(const std::string& local_id) {}
37 39
38 // Sent when a specific drive sync error occurred. 40 // Sent when a specific drive sync error occurred.
39 // |local_id| is the local ID of the resource entry. 41 // |local_id| is the local ID of the resource entry.
40 virtual void OnDriveSyncError(DriveSyncErrorType type, 42 virtual void OnDriveSyncError(DriveSyncErrorType type,
41 const std::string& local_id) {} 43 const std::string& local_id) {}
42 }; 44 };
43 45
44 } // namespace file_system 46 } // namespace file_system
45 } // namespace drive 47 } // namespace drive
46 48
47 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_ 49 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698