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