- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / sync / glue / shared_change_processor_mock.h
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_GLUE_SHARED_CHANGE_PROCESSOR_MOCK_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_MOCK_H_
7
8 #include "chrome/browser/sync/glue/shared_change_processor.h"
9 #include "sync/api/sync_change.h"
10 #include "sync/api/sync_data.h"
11 #include "sync/internal_api/public/util/unrecoverable_error_handler.h"
12 #include "testing/gmock/include/gmock/gmock.h"
13
14 namespace browser_sync {
15
16 class SharedChangeProcessorMock : public SharedChangeProcessor {
17  public:
18   SharedChangeProcessorMock();
19
20   MOCK_METHOD5(Connect, base::WeakPtr<syncer::SyncableService>(
21       ProfileSyncComponentsFactory*,
22       ProfileSyncService*,
23       DataTypeErrorHandler*,
24       syncer::ModelType,
25       const base::WeakPtr<syncer::SyncMergeResult>&));
26   MOCK_METHOD0(Disconnect, bool());
27   MOCK_METHOD2(ProcessSyncChanges,
28                syncer::SyncError(const tracked_objects::Location&,
29                          const syncer::SyncChangeList&));
30   MOCK_CONST_METHOD2(GetAllSyncDataReturnError,
31                      syncer::SyncError(syncer::ModelType,
32                                        syncer::SyncDataList*));
33   MOCK_METHOD0(GetSyncCount, int());
34   MOCK_METHOD1(SyncModelHasUserCreatedNodes,
35                bool(bool*));
36   MOCK_METHOD0(CryptoReadyIfNecessary, bool());
37   MOCK_METHOD1(ActivateDataType,
38                void(syncer::ModelSafeGroup));
39
40  protected:
41   virtual ~SharedChangeProcessorMock();
42   MOCK_METHOD2(OnUnrecoverableError, void(const tracked_objects::Location&,
43                                           const std::string&));
44
45  private:
46   DISALLOW_COPY_AND_ASSIGN(SharedChangeProcessorMock);
47 };
48
49 }  // namespace browser_sync
50
51 #endif  // CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_MOCK_H_