Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: chrome/browser/sync/glue/model_associator_mock.h

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the previous fix Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_GLUE_MODEL_ASSOCIATOR_MOCK_H__ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_MOCK_H__
6 #define CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_MOCK_H__ 6 #define CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_MOCK_H__
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/sync/glue/model_associator.h" 9 #include "chrome/browser/sync/glue/model_associator.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
11 11
12 namespace browser_sync { 12 namespace browser_sync {
13 13
14 class ModelAssociatorMock : public AssociatorInterface { 14 class ModelAssociatorMock : public AssociatorInterface {
15 public: 15 public:
16 ModelAssociatorMock(); 16 ModelAssociatorMock();
17 virtual ~ModelAssociatorMock(); 17 virtual ~ModelAssociatorMock();
18 18
19 MOCK_METHOD0(AssociateModels, bool()); 19 MOCK_METHOD0(AssociateModels, bool());
20 MOCK_METHOD0(DisassociateModels, bool()); 20 MOCK_METHOD0(DisassociateModels, bool());
21 MOCK_METHOD1(SyncModelHasUserCreatedNodes, bool(bool* has_nodes)); 21 MOCK_METHOD1(SyncModelHasUserCreatedNodes, bool(bool* has_nodes));
22 MOCK_METHOD0(AbortAssociation, void()); 22 MOCK_METHOD0(AbortAssociation, void());
23 MOCK_METHOD0(CryptoReadyIfNecessary, bool()); 23 MOCK_METHOD0(CryptoReadyIfNecessary, bool());
24 }; 24 };
25 25
26 // Refcounted.
27 class NewModelAssociatorMock : public NewAssociatorInterface {
28 public:
29 NewModelAssociatorMock();
30 virtual ~NewModelAssociatorMock();
31
32 MOCK_METHOD0(AssociateModels, bool());
33 MOCK_METHOD0(DisassociateModels, bool());
34 MOCK_METHOD1(SyncModelHasUserCreatedNodes, bool(bool* has_nodes));
35 MOCK_METHOD0(AbortAssociation, void());
36 MOCK_METHOD0(CryptoReadyIfNecessary, bool());
37 MOCK_METHOD0(model_type, syncable::ModelType());
38 MOCK_METHOD1(set_change_processor, void(ChangeProcessor* processor));
39 MOCK_METHOD0(change_processor, ChangeProcessor*());
40 MOCK_METHOD3(ApplyChangesFromSync, void(
41 const sync_api::BaseTransaction* trans,
42 const sync_api::SyncManager::ChangeRecord* changes,
43 int change_count));
44 };
45
26 } // namespace browser_sync 46 } // namespace browser_sync
27 47
28 #endif // CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_MOCK_H__ 48 #endif // CHROME_BROWSER_SYNC_GLUE_MODEL_ASSOCIATOR_MOCK_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698