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

Side by Side Diff: sync/internal_api/public/test/data_type_error_handler_mock.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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 SYNC_INTERNAL_API_PUBLIC_TEST_DATA_TYPE_ERROR_HANDLER_MOCK_H__
6 #define SYNC_INTERNAL_API_PUBLIC_TEST_DATA_TYPE_ERROR_HANDLER_MOCK_H__
7
8 #include <string>
9
10 #include "sync/internal_api/public/base/model_type.h"
11 #include "sync/internal_api/public/data_type_error_handler.h"
12
13 namespace syncer {
14
15 // A mock DataTypeErrorHandler for testing. Set the expected error type with
16 // ExpectError and OnSingleDataTypeUnrecoverableError will pass. If the error is
17 // not called this object's destructor will DCHECK.
18 class DataTypeErrorHandlerMock : public DataTypeErrorHandler {
19 public:
20 DataTypeErrorHandlerMock();
21 ~DataTypeErrorHandlerMock() override;
22
23 void OnSingleDataTypeUnrecoverableError(const SyncError& error) override;
24 SyncError CreateAndUploadError(const tracked_objects::Location& location,
25 const std::string& message,
26 ModelType type) override;
27
28 // Set the |error_type| to expect.
29 void ExpectError(SyncError::ErrorType error_type);
30
31 private:
32 // The error type to expect.
33 SyncError::ErrorType expected_error_type_ = SyncError::UNSET;
34 };
35
36 } // namespace syncer
37
38 #endif // SYNC_INTERNAL_API_PUBLIC_TEST_DATA_TYPE_ERROR_HANDLER_MOCK_H__
OLDNEW
« no previous file with comments | « sync/internal_api/public/sync_manager_factory.h ('k') | sync/internal_api/public/test/fake_model_type_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698