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

Unified Diff: chrome/browser/sync/glue/new_non_frontend_data_type_controller_mock.h

Issue 8065016: [Sync] Refactor non-frontend DTC to handle new API properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/new_non_frontend_data_type_controller_mock.h
diff --git a/chrome/browser/sync/glue/new_non_frontend_data_type_controller_mock.h b/chrome/browser/sync/glue/new_non_frontend_data_type_controller_mock.h
new file mode 100644
index 0000000000000000000000000000000000000000..50ca5a3de02f8c1f187900053c296d9252838de8
--- /dev/null
+++ b/chrome/browser/sync/glue/new_non_frontend_data_type_controller_mock.h
@@ -0,0 +1,64 @@
+// Copyright (c) 2011 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 CHROME_BROWSER_SYNC_GLUE_NEW_NON_FRONTEND_DATA_TYPE_CONTROLLER_MOCK_H_
+#define CHROME_BROWSER_SYNC_GLUE_NEW_NON_FRONTEND_DATA_TYPE_CONTROLLER_MOCK_H_
+#pragma once
+
+#include "chrome/browser/sync/api/sync_error.h"
+#include "chrome/browser/sync/glue/new_non_frontend_data_type_controller.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace browser_sync {
+
+class NewNonFrontendDataTypeControllerMock
+ : public NewNonFrontendDataTypeController {
+ public:
+ NewNonFrontendDataTypeControllerMock();
+ virtual ~NewNonFrontendDataTypeControllerMock();
+
+ // DataTypeController mocks.
+ MOCK_METHOD1(Start, void(StartCallback* start_callback));
+ MOCK_METHOD0(Stop, void());
+ MOCK_METHOD0(enabled, bool());
+ MOCK_CONST_METHOD0(type, syncable::ModelType());
+ MOCK_CONST_METHOD0(name, std::string());
+ MOCK_CONST_METHOD0(model_safe_group, browser_sync::ModelSafeGroup());
+ MOCK_CONST_METHOD0(state, State());
+ MOCK_METHOD2(OnUnrecoverableError, void(const tracked_objects::Location&,
+ const std::string&));
+
+ // NonFrontendDataTypeController mocks.
+ MOCK_METHOD0(StartModels, bool());
+ MOCK_METHOD0(StartAssociationAsync, bool());
+ MOCK_METHOD0(StartAssociation, void());
+ MOCK_METHOD0(CreateSyncComponents, void());
+ MOCK_METHOD2(StartFailed, void(StartResult result,
+ const SyncError& error));
+ MOCK_METHOD3(StartDone, void(DataTypeController::StartResult result,
+ DataTypeController::State new_state,
+ const SyncError& error));
+ MOCK_METHOD3(StartDoneImpl, void(DataTypeController::StartResult result,
+ DataTypeController::State new_state,
+ const SyncError& error));
+ MOCK_METHOD0(StopModels, void());
+ MOCK_METHOD0(StopAssociationAsync, bool());
+ MOCK_METHOD0(StopAssociation, void());
+ MOCK_METHOD2(OnUnrecoverableErrorImpl, void(const tracked_objects::Location&,
+ const std::string&));
+ MOCK_METHOD2(RecordUnrecoverableError, void(const tracked_objects::Location&,
+ const std::string&));
+ MOCK_METHOD1(RecordAssociationTime, void(base::TimeDelta time));
+ MOCK_METHOD1(RecordStartFailure, void(StartResult result));
+
+ // NewNonFrontendDataTypeController mocks.
+ MOCK_CONST_METHOD0(GetWeakPtrToSyncableService,
+ base::WeakPtr<SyncableService>());
+ MOCK_METHOD0(StopLocalService, void());
+ MOCK_METHOD0(StopLocalServiceAsync, void());
+};
+
+} // namespace browser_sync
+
+#endif // CHROME_BROWSER_SYNC_GLUE_NEW_NON_FRONTEND_DATA_TYPE_CONTROLLER_MOCK_H_

Powered by Google App Engine
This is Rietveld 408576698