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

Side by Side Diff: components/sync/test/engine/mock_model_type_processor.h

Issue 2689773002: [Sync] Replace typedef with using. (Closed)
Patch Set: [Sync] Replace typedef with using. Created 3 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_ 5 #ifndef COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_
6 #define COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_ 6 #define COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 17 matching lines...) Expand all
28 // ability to defer execution if we need to test race conditions, though. 28 // ability to defer execution if we need to test race conditions, though.
29 // 29 //
30 // It maintains some state to try to make its behavior more realistic. It 30 // It maintains some state to try to make its behavior more realistic. It
31 // updates this state as it creates commit requests or receives update and 31 // updates this state as it creates commit requests or receives update and
32 // commit responses. 32 // commit responses.
33 // 33 //
34 // It keeps a log of all received messages so tests can make assertions based 34 // It keeps a log of all received messages so tests can make assertions based
35 // on their value. 35 // on their value.
36 class MockModelTypeProcessor : public ModelTypeProcessor { 36 class MockModelTypeProcessor : public ModelTypeProcessor {
37 public: 37 public:
38 typedef base::Callback<void()> DisconnectCallback; 38 using DisconnectCallback = base::Callback<void()>;
39 39
40 MockModelTypeProcessor(); 40 MockModelTypeProcessor();
41 ~MockModelTypeProcessor() override; 41 ~MockModelTypeProcessor() override;
42 42
43 // Implementation of ModelTypeProcessor. 43 // Implementation of ModelTypeProcessor.
44 void ConnectSync(std::unique_ptr<CommitQueue> commit_queue) override; 44 void ConnectSync(std::unique_ptr<CommitQueue> commit_queue) override;
45 void DisconnectSync() override; 45 void DisconnectSync() override;
46 void OnCommitCompleted(const sync_pb::ModelTypeState& type_state, 46 void OnCommitCompleted(const sync_pb::ModelTypeState& type_state,
47 const CommitResponseDataList& response_list) override; 47 const CommitResponseDataList& response_list) override;
48 void OnUpdateReceived(const sync_pb::ModelTypeState& type_state, 48 void OnUpdateReceived(const sync_pb::ModelTypeState& type_state,
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 // Callback which will be call during disconnection 148 // Callback which will be call during disconnection
149 DisconnectCallback disconnect_callback_; 149 DisconnectCallback disconnect_callback_;
150 150
151 DISALLOW_COPY_AND_ASSIGN(MockModelTypeProcessor); 151 DISALLOW_COPY_AND_ASSIGN(MockModelTypeProcessor);
152 }; 152 };
153 153
154 } // namespace syncer 154 } // namespace syncer
155 155
156 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_ 156 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_MODEL_TYPE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « components/sync/syncable/write_transaction_info.h ('k') | components/sync/test/fake_server/fake_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698