| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chrome/browser/sync_file_system/remote_change_processor.h" | 9 #include "chrome/browser/sync_file_system/remote_change_processor.h" |
| 10 #include "chrome/browser/sync_file_system/remote_file_sync_service.h" | 10 #include "chrome/browser/sync_file_system/remote_file_sync_service.h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
| 12 #include "webkit/fileapi/syncable/sync_callbacks.h" | 12 #include "webkit/fileapi/syncable/sync_callbacks.h" |
| 13 | 13 |
| 14 class GURL; | 14 class GURL; |
| 15 | 15 |
| 16 namespace sync_file_system { | 16 namespace sync_file_system { |
| 17 | 17 |
| 18 class MockRemoteFileSyncService : public RemoteFileSyncService { | 18 class MockRemoteFileSyncService : public RemoteFileSyncService { |
| 19 public: | 19 public: |
| 20 MockRemoteFileSyncService(); | 20 MockRemoteFileSyncService(); |
| 21 virtual ~MockRemoteFileSyncService(); | 21 virtual ~MockRemoteFileSyncService(); |
| 22 | 22 |
| 23 // RemoteFileSyncService overrides. | 23 // RemoteFileSyncService overrides. |
| 24 MOCK_METHOD1(AddObserver, void(RemoteFileSyncService::Observer* observer)); | 24 MOCK_METHOD1(AddObserver, void(RemoteFileSyncService::Observer* observer)); |
| 25 MOCK_METHOD1(RemoveObserver, void(RemoteFileSyncService::Observer* observer)); | 25 MOCK_METHOD1(RemoveObserver, void(RemoteFileSyncService::Observer* observer)); |
| 26 MOCK_METHOD1(RegisterOriginForTrackingChanges, void(const GURL& origin)); | 26 MOCK_METHOD2(RegisterOriginForTrackingChanges, |
| 27 MOCK_METHOD1(UnregisterOriginForTrackingChanges, void(const GURL& origin)); | 27 void(const GURL& origin, |
| 28 const fileapi::SyncStatusCallback& callback)); |
| 29 MOCK_METHOD2(UnregisterOriginForTrackingChanges, |
| 30 void(const GURL& origin, |
| 31 const fileapi::SyncStatusCallback& callback)); |
| 28 MOCK_METHOD2(ProcessRemoteChange, | 32 MOCK_METHOD2(ProcessRemoteChange, |
| 29 void(RemoteChangeProcessor* processor, | 33 void(RemoteChangeProcessor* processor, |
| 30 const fileapi::SyncFileCallback& callback)); | 34 const fileapi::SyncFileCallback& callback)); |
| 31 MOCK_METHOD0(GetLocalChangeProcessor, LocalChangeProcessor*()); | 35 MOCK_METHOD0(GetLocalChangeProcessor, LocalChangeProcessor*()); |
| 32 MOCK_METHOD2(GetConflictFiles, | 36 MOCK_METHOD2(GetConflictFiles, |
| 33 void(const GURL& origin, | 37 void(const GURL& origin, |
| 34 const fileapi::SyncFileSetCallback& callback)); | 38 const fileapi::SyncFileSetCallback& callback)); |
| 35 MOCK_METHOD2(GetRemoteFileMetadata, | 39 MOCK_METHOD2(GetRemoteFileMetadata, |
| 36 void(const fileapi::FileSystemURL& url, | 40 void(const fileapi::FileSystemURL& url, |
| 37 const fileapi::SyncFileMetadataCallback& callback)); | 41 const fileapi::SyncFileMetadataCallback& callback)); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 48 const fileapi::SyncFileCallback& callback); | 52 const fileapi::SyncFileCallback& callback); |
| 49 | 53 |
| 50 scoped_ptr<LocalChangeProcessor> local_change_processor_; | 54 scoped_ptr<LocalChangeProcessor> local_change_processor_; |
| 51 | 55 |
| 52 DISALLOW_COPY_AND_ASSIGN(MockRemoteFileSyncService); | 56 DISALLOW_COPY_AND_ASSIGN(MockRemoteFileSyncService); |
| 53 }; | 57 }; |
| 54 | 58 |
| 55 } // namespace sync_file_system | 59 } // namespace sync_file_system |
| 56 | 60 |
| 57 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_ | 61 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_FILE_SYNC_SERVICE_H_ |
| OLD | NEW |