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

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

Powered by Google App Engine
This is Rietveld 408576698