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

Side by Side Diff: components/sync/model/data_type_error_handler_mock.h

Issue 2401223002: [Sync] Renaming sync/api* to sync/model*. (Closed)
Patch Set: Missed a comment in a DEPS file, and rebasing. Created 4 years, 2 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_API_DATA_TYPE_ERROR_HANDLER_MOCK_H__ 5 #ifndef COMPONENTS_SYNC_MODEL_DATA_TYPE_ERROR_HANDLER_MOCK_H__
6 #define COMPONENTS_SYNC_API_DATA_TYPE_ERROR_HANDLER_MOCK_H__ 6 #define COMPONENTS_SYNC_MODEL_DATA_TYPE_ERROR_HANDLER_MOCK_H__
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "components/sync/api/data_type_error_handler.h"
12 #include "components/sync/base/model_type.h" 11 #include "components/sync/base/model_type.h"
12 #include "components/sync/model/data_type_error_handler.h"
13 13
14 namespace syncer { 14 namespace syncer {
15 15
16 // A mock DataTypeErrorHandler for testing. Set the expected error type with 16 // A mock DataTypeErrorHandler for testing. Set the expected error type with
17 // ExpectError and OnUnrecoverableError will pass. If the error is not called 17 // ExpectError and OnUnrecoverableError will pass. If the error is not called
18 // this object's destructor will DCHECK. 18 // this object's destructor will DCHECK.
19 class DataTypeErrorHandlerMock : public DataTypeErrorHandler { 19 class DataTypeErrorHandlerMock : public DataTypeErrorHandler {
20 public: 20 public:
21 DataTypeErrorHandlerMock(); 21 DataTypeErrorHandlerMock();
22 ~DataTypeErrorHandlerMock() override; 22 ~DataTypeErrorHandlerMock() override;
23 23
24 void OnUnrecoverableError(const SyncError& error) override; 24 void OnUnrecoverableError(const SyncError& error) override;
25 SyncError CreateAndUploadError(const tracked_objects::Location& location, 25 SyncError CreateAndUploadError(const tracked_objects::Location& location,
26 const std::string& message, 26 const std::string& message,
27 ModelType type) override; 27 ModelType type) override;
28 std::unique_ptr<DataTypeErrorHandler> Copy() const override; 28 std::unique_ptr<DataTypeErrorHandler> Copy() const override;
29 29
30 // Set the |error_type| to expect. 30 // Set the |error_type| to expect.
31 void ExpectError(SyncError::ErrorType error_type); 31 void ExpectError(SyncError::ErrorType error_type);
32 32
33 private: 33 private:
34 // The error type to expect. 34 // The error type to expect.
35 SyncError::ErrorType expected_error_type_ = SyncError::UNSET; 35 SyncError::ErrorType expected_error_type_ = SyncError::UNSET;
36 }; 36 };
37 37
38 } // namespace syncer 38 } // namespace syncer
39 39
40 #endif // COMPONENTS_SYNC_API_DATA_TYPE_ERROR_HANDLER_MOCK_H__ 40 #endif // COMPONENTS_SYNC_MODEL_DATA_TYPE_ERROR_HANDLER_MOCK_H__
OLDNEW
« no previous file with comments | « components/sync/model/data_type_error_handler_impl.cc ('k') | components/sync/model/data_type_error_handler_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698