| 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_MOCK_REMOTE_FILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 | 55 |
| 56 // Send notifications to the observers. | 56 // Send notifications to the observers. |
| 57 // Can be used in the mock implementation. | 57 // Can be used in the mock implementation. |
| 58 void NotifyRemoteChangeQueueUpdated(int64 pending_changes); | 58 void NotifyRemoteChangeQueueUpdated(int64 pending_changes); |
| 59 void NotifyRemoteServiceStateUpdated( | 59 void NotifyRemoteServiceStateUpdated( |
| 60 RemoteServiceState state, | 60 RemoteServiceState state, |
| 61 const std::string& description); | 61 const std::string& description); |
| 62 void NotifyFileStatusChanged( | 62 void NotifyFileStatusChanged( |
| 63 const fileapi::FileSystemURL& url, | 63 const fileapi::FileSystemURL& url, |
| 64 fileapi::SyncFileStatus sync_status, | 64 SyncFileStatus sync_status, |
| 65 fileapi::SyncAction action_taken, | 65 SyncAction action_taken, |
| 66 fileapi::SyncDirection direction); | 66 SyncDirection direction); |
| 67 | 67 |
| 68 // Sets conflict file information. The information is returned by | 68 // Sets conflict file information. The information is returned by |
| 69 // the default action for GetRemoteConflictFileInfo. | 69 // the default action for GetRemoteConflictFileInfo. |
| 70 void add_conflict_file(const fileapi::FileSystemURL& url, | 70 void add_conflict_file(const fileapi::FileSystemURL& url, |
| 71 const fileapi::SyncFileMetadata& metadata) { | 71 const fileapi::SyncFileMetadata& metadata) { |
| 72 conflict_file_urls_[url.origin()].insert(url); | 72 conflict_file_urls_[url.origin()].insert(url); |
| 73 conflict_file_metadata_[url] = metadata; | 73 conflict_file_metadata_[url] = metadata; |
| 74 } | 74 } |
| 75 | 75 |
| 76 void reset_conflict_files() { | 76 void reset_conflict_files() { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 106 | 106 |
| 107 ObserverList<Observer> service_observers_; | 107 ObserverList<Observer> service_observers_; |
| 108 ObserverList<FileStatusObserver> file_status_observers_; | 108 ObserverList<FileStatusObserver> file_status_observers_; |
| 109 | 109 |
| 110 DISALLOW_COPY_AND_ASSIGN(MockRemoteFileSyncService); | 110 DISALLOW_COPY_AND_ASSIGN(MockRemoteFileSyncService); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace sync_file_system | 113 } // namespace sync_file_system |
| 114 | 114 |
| 115 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_ | 115 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_ |
| OLD | NEW |