| OLD | NEW |
| 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_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // This also maintains conflict information, i.e. a list of conflicting files | 51 // This also maintains conflict information, i.e. a list of conflicting files |
| 52 // (at least in the current design). | 52 // (at least in the current design). |
| 53 // Owned by SyncFileSystemService. | 53 // Owned by SyncFileSystemService. |
| 54 class RemoteFileSyncService { | 54 class RemoteFileSyncService { |
| 55 public: | 55 public: |
| 56 class Observer { | 56 class Observer { |
| 57 public: | 57 public: |
| 58 Observer() {} | 58 Observer() {} |
| 59 virtual ~Observer() {} | 59 virtual ~Observer() {} |
| 60 | 60 |
| 61 // This is called when there're one or more remote changes available. | 61 // This is called when RemoteFileSyncService updates its internal queue |
| 62 // of pending remote changes. |
| 62 // |pending_changes_hint| indicates the pending queue length to help sync | 63 // |pending_changes_hint| indicates the pending queue length to help sync |
| 63 // scheduling but the value may not be accurately reflect the real-time | 64 // scheduling but the value may not be accurately reflect the real-time |
| 64 // value. | 65 // value. |
| 65 virtual void OnRemoteChangeAvailable(int64 pending_changes_hint) = 0; | 66 virtual void OnRemoteChangeQueueUpdated(int64 pending_changes_hint) = 0; |
| 66 | 67 |
| 67 // This is called when RemoteFileSyncService updates its state. | 68 // This is called when RemoteFileSyncService updates its state. |
| 68 virtual void OnRemoteServiceStateUpdated( | 69 virtual void OnRemoteServiceStateUpdated( |
| 69 RemoteServiceState state, | 70 RemoteServiceState state, |
| 70 const std::string& description) {} | 71 const std::string& description) {} |
| 71 | 72 |
| 72 private: | 73 private: |
| 73 DISALLOW_COPY_AND_ASSIGN(Observer); | 74 DISALLOW_COPY_AND_ASSIGN(Observer); |
| 74 }; | 75 }; |
| 75 | 76 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // returned by the last OnRemoteServiceStateUpdated notification. | 128 // returned by the last OnRemoteServiceStateUpdated notification. |
| 128 virtual RemoteServiceState GetCurrentState() const = 0; | 129 virtual RemoteServiceState GetCurrentState() const = 0; |
| 129 | 130 |
| 130 private: | 131 private: |
| 131 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); | 132 DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService); |
| 132 }; | 133 }; |
| 133 | 134 |
| 134 } // namespace sync_file_system | 135 } // namespace sync_file_system |
| 135 | 136 |
| 136 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ | 137 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_ |
| OLD | NEW |