Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / sync / glue / shared_change_processor_mock.h
blob0335125bef8e5410fbca4643da98f8c54fc25234
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.
5 #ifndef CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_MOCK_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_MOCK_H_
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"
14 namespace browser_sync {
16 class SharedChangeProcessorMock : public SharedChangeProcessor {
17 public:
18 SharedChangeProcessorMock();
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));
40 protected:
41 virtual ~SharedChangeProcessorMock();
42 MOCK_METHOD2(OnUnrecoverableError, void(const tracked_objects::Location&,
43 const std::string&));
45 private:
46 DISALLOW_COPY_AND_ASSIGN(SharedChangeProcessorMock);
49 } // namespace browser_sync
51 #endif // CHROME_BROWSER_SYNC_GLUE_SHARED_CHANGE_PROCESSOR_MOCK_H_