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

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

Issue 137903002: Files.app: Add a drive sync error event to the fileBrowserPrivate API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed typo. Created 6 years, 11 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 namespace file_system { 13 namespace file_system {
14 14
15 // Error type of sync client.
16 enum DriveSyncErrorType {
17 // Request to delete a file without permission.
18 DELETE_WITHOUT_PERMISSION
19 };
20
15 // Passes notifications from Drive operations back to the file system. 21 // Passes notifications from Drive operations back to the file system.
16 class OperationObserver { 22 class OperationObserver {
17 public: 23 public:
18 // Sent when a content of a directory has been changed. 24 // Sent when a content of a directory has been changed.
19 // |directory_path| is a virtual directory path representing the 25 // |directory_path| is a virtual directory path representing the
20 // changed directory. 26 // changed directory.
21 virtual void OnDirectoryChangedByOperation( 27 virtual void OnDirectoryChangedByOperation(
22 const base::FilePath& directory_path) = 0; 28 const base::FilePath& directory_path) = 0;
23 29
24 // Sent when a cache file is modified and upload is needed. 30 // Sent when a cache file is modified and upload is needed.
25 virtual void OnCacheFileUploadNeededByOperation( 31 virtual void OnCacheFileUploadNeededByOperation(
26 const std::string& local_id) = 0; 32 const std::string& local_id) = 0;
27 33
28 // Sent when metadata entry is updated and sync is needed. 34 // Sent when metadata entry is updated and sync is needed.
29 virtual void OnEntryUpdatedByOperation(const std::string& local_id) {} 35 virtual void OnEntryUpdatedByOperation(const std::string& local_id) {}
36
37 // Sent when a specific drive sync error occurred.
38 virtual void OnDriveSyncError(DriveSyncErrorType type) {}
30 }; 39 };
31 40
32 } // namespace file_system 41 } // namespace file_system
33 } // namespace drive 42 } // namespace drive
34 43
35 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_ 44 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.cc ('k') | chrome/browser/chromeos/drive/file_system/operation_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698