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 <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 | 11 |
| 12 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
11 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
12 #include "base/values.h" | 15 #include "base/values.h" |
13 #include "chrome/browser/sync_file_system/file_status_observer.h" | 16 #include "chrome/browser/sync_file_system/file_status_observer.h" |
14 #include "chrome/browser/sync_file_system/mock_local_change_processor.h" | 17 #include "chrome/browser/sync_file_system/mock_local_change_processor.h" |
15 #include "chrome/browser/sync_file_system/remote_change_processor.h" | 18 #include "chrome/browser/sync_file_system/remote_change_processor.h" |
16 #include "chrome/browser/sync_file_system/remote_file_sync_service.h" | 19 #include "chrome/browser/sync_file_system/remote_file_sync_service.h" |
17 #include "chrome/browser/sync_file_system/sync_callbacks.h" | 20 #include "chrome/browser/sync_file_system/sync_callbacks.h" |
18 #include "chrome/browser/sync_file_system/sync_direction.h" | 21 #include "chrome/browser/sync_file_system/sync_direction.h" |
19 #include "chrome/browser/sync_file_system/sync_file_metadata.h" | 22 #include "chrome/browser/sync_file_system/sync_file_metadata.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 MOCK_METHOD1(SetSyncEnabled, void(bool enabled)); | 57 MOCK_METHOD1(SetSyncEnabled, void(bool enabled)); |
55 MOCK_METHOD1(PromoteDemotedChanges, void(const base::Closure& callback)); | 58 MOCK_METHOD1(PromoteDemotedChanges, void(const base::Closure& callback)); |
56 | 59 |
57 void DumpFiles(const GURL& origin, const ListCallback& callback) override; | 60 void DumpFiles(const GURL& origin, const ListCallback& callback) override; |
58 void DumpDatabase(const ListCallback& callback) override; | 61 void DumpDatabase(const ListCallback& callback) override; |
59 | 62 |
60 void SetServiceState(RemoteServiceState state); | 63 void SetServiceState(RemoteServiceState state); |
61 | 64 |
62 // Send notifications to the observers. | 65 // Send notifications to the observers. |
63 // Can be used in the mock implementation. | 66 // Can be used in the mock implementation. |
64 void NotifyRemoteChangeQueueUpdated(int64 pending_changes); | 67 void NotifyRemoteChangeQueueUpdated(int64_t pending_changes); |
65 void NotifyRemoteServiceStateUpdated( | 68 void NotifyRemoteServiceStateUpdated( |
66 RemoteServiceState state, | 69 RemoteServiceState state, |
67 const std::string& description); | 70 const std::string& description); |
68 void NotifyFileStatusChanged(const storage::FileSystemURL& url, | 71 void NotifyFileStatusChanged(const storage::FileSystemURL& url, |
69 SyncFileType file_type, | 72 SyncFileType file_type, |
70 SyncFileStatus sync_status, | 73 SyncFileStatus sync_status, |
71 SyncAction action_taken, | 74 SyncAction action_taken, |
72 SyncDirection direction); | 75 SyncDirection direction); |
73 | 76 |
74 private: | 77 private: |
(...skipping 14 matching lines...) Expand all Loading... |
89 base::ObserverList<FileStatusObserver> file_status_observers_; | 92 base::ObserverList<FileStatusObserver> file_status_observers_; |
90 | 93 |
91 RemoteServiceState state_; | 94 RemoteServiceState state_; |
92 | 95 |
93 DISALLOW_COPY_AND_ASSIGN(MockRemoteFileSyncService); | 96 DISALLOW_COPY_AND_ASSIGN(MockRemoteFileSyncService); |
94 }; | 97 }; |
95 | 98 |
96 } // namespace sync_file_system | 99 } // namespace sync_file_system |
97 | 100 |
98 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_ | 101 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_ |
OLD | NEW |