summaryrefslogtreecommitdiffstats
path: root/components/sync_driver/data_type_controller_mock.h
diff options
context:
space:
mode:
authorblundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-31 21:37:55 +0000
committerblundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-31 21:37:55 +0000
commitdfe6a9ba86bfec4c6fd18dfc94c2e365caa25e50 (patch)
treebf59d1c63b565eb34f44dfe45c534268ed160128 /components/sync_driver/data_type_controller_mock.h
parentdf06a3ec31117e7fb700455df117479c310732a2 (diff)
downloadchromium_src-dfe6a9ba86bfec4c6fd18dfc94c2e365caa25e50.zip
chromium_src-dfe6a9ba86bfec4c6fd18dfc94c2e365caa25e50.tar.gz
chromium_src-dfe6a9ba86bfec4c6fd18dfc94c2e365caa25e50.tar.bz2
Move DataTypeController and DataTypeManager into sync_driver component.
This CL does the following: - Changes DataTypeController to take in an error callback that it calls on unrecoverable errors rather than calling ChromeReportUnrecoverableError directly. - Changes DataTypeController to be deleted on a passed-in MessageLoopProxy rather than deleted on a content::BrowserThread. - Moves DataTypeController into the sync_driver component. - Moves DataTypeManager (which depends only on DataTypeController) into the sync_driver component. - Moves associated fakes and mocks into the sync_driver component. BUG=339726 TBR=thakis Review URL: https://codereview.chromium.org/137893027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248274 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/sync_driver/data_type_controller_mock.h')
-rw-r--r--components/sync_driver/data_type_controller_mock.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/components/sync_driver/data_type_controller_mock.h b/components/sync_driver/data_type_controller_mock.h
new file mode 100644
index 0000000..1f3b9d6
--- /dev/null
+++ b/components/sync_driver/data_type_controller_mock.h
@@ -0,0 +1,34 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_SYNC_DRIVER_DATA_TYPE_CONTROLLER_MOCK_H__
+#define COMPONENTS_SYNC_DRIVER_DATA_TYPE_CONTROLLER_MOCK_H__
+
+#include "components/sync_driver/data_type_controller.h"
+#include "sync/api/sync_error.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace browser_sync {
+
+class StartCallbackMock {
+ public:
+ StartCallbackMock();
+ virtual ~StartCallbackMock();
+
+ MOCK_METHOD3(Run, void(DataTypeController::StartResult result,
+ const syncer::SyncMergeResult& local_merge_result,
+ const syncer::SyncMergeResult& syncer_merge_result));
+};
+
+class ModelLoadCallbackMock {
+ public:
+ ModelLoadCallbackMock();
+ virtual ~ModelLoadCallbackMock();
+
+ MOCK_METHOD2(Run, void(syncer::ModelType, syncer::SyncError));
+};
+
+} // namespace browser_sync
+
+#endif // COMPONENTS_SYNC_DRIVER_DATA_TYPE_CONTROLLER_MOCK_H__