| 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_CHANGE_PROCESSOR_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_CHANGE_PROCESSOR_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_CHANGE_PROCESSOR_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_CHANGE_PROCESSOR_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.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 "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| 11 #include "webkit/fileapi/syncable/file_change.h" | 11 #include "webkit/fileapi/syncable/file_change.h" |
| 12 #include "webkit/fileapi/syncable/sync_callbacks.h" | 12 #include "webkit/fileapi/syncable/sync_callbacks.h" |
| 13 | 13 |
| 14 namespace base { |
| 14 class FilePath; | 15 class FilePath; |
| 16 } |
| 15 | 17 |
| 16 namespace fileapi { | 18 namespace fileapi { |
| 17 class FileSystemURL; | 19 class FileSystemURL; |
| 18 } | 20 } |
| 19 | 21 |
| 20 namespace sync_file_system { | 22 namespace sync_file_system { |
| 21 | 23 |
| 22 class MockRemoteChangeProcessor : public RemoteChangeProcessor { | 24 class MockRemoteChangeProcessor : public RemoteChangeProcessor { |
| 23 public: | 25 public: |
| 24 MockRemoteChangeProcessor(); | 26 MockRemoteChangeProcessor(); |
| 25 virtual ~MockRemoteChangeProcessor(); | 27 virtual ~MockRemoteChangeProcessor(); |
| 26 | 28 |
| 27 // RemoteChangeProcessor overrides. | 29 // RemoteChangeProcessor overrides. |
| 28 MOCK_METHOD3(PrepareForProcessRemoteChange, | 30 MOCK_METHOD3(PrepareForProcessRemoteChange, |
| 29 void(const fileapi::FileSystemURL& url, | 31 void(const fileapi::FileSystemURL& url, |
| 30 const std::string& service_name, | 32 const std::string& service_name, |
| 31 const PrepareChangeCallback& callback)); | 33 const PrepareChangeCallback& callback)); |
| 32 MOCK_METHOD4(ApplyRemoteChange, | 34 MOCK_METHOD4(ApplyRemoteChange, |
| 33 void(const fileapi::FileChange& change, | 35 void(const fileapi::FileChange& change, |
| 34 const FilePath& local_path, | 36 const base::FilePath& local_path, |
| 35 const fileapi::FileSystemURL& url, | 37 const fileapi::FileSystemURL& url, |
| 36 const fileapi::SyncStatusCallback& callback)); | 38 const fileapi::SyncStatusCallback& callback)); |
| 37 MOCK_METHOD2(ClearLocalChanges, | 39 MOCK_METHOD2(ClearLocalChanges, |
| 38 void(const fileapi::FileSystemURL& url, | 40 void(const fileapi::FileSystemURL& url, |
| 39 const base::Closure& completion_callback)); | 41 const base::Closure& completion_callback)); |
| 40 MOCK_METHOD3(RecordFakeLocalChange, | 42 MOCK_METHOD3(RecordFakeLocalChange, |
| 41 void(const fileapi::FileSystemURL& url, | 43 void(const fileapi::FileSystemURL& url, |
| 42 const fileapi::FileChange& change, | 44 const fileapi::FileChange& change, |
| 43 const fileapi::SyncStatusCallback& callback)); | 45 const fileapi::SyncStatusCallback& callback)); |
| 44 | 46 |
| 45 private: | 47 private: |
| 46 DISALLOW_COPY_AND_ASSIGN(MockRemoteChangeProcessor); | 48 DISALLOW_COPY_AND_ASSIGN(MockRemoteChangeProcessor); |
| 47 }; | 49 }; |
| 48 | 50 |
| 49 } // namespace sync_file_system | 51 } // namespace sync_file_system |
| 50 | 52 |
| 51 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_CHANGE_PROCESSOR_H_ | 53 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_MOCK_REMOTE_CHANGE_PROCESSOR_H_ |
| OLD | NEW |