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

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

Issue 10834351: [sync] Divorce DataTypeManager from NotificationService notifications by creating a new DataTypeMa… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore expectations in DTMImpl unittest + Treat observer_ as const Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/data_type_manager_mock.h
diff --git a/chrome/browser/sync/glue/data_type_manager_mock.h b/chrome/browser/sync/glue/data_type_manager_mock.h
index c2c14c1d4cad09104493b1d56eb09866186999e1..5f6d1924c79ba49812efffe208b677e96485db54 100644
--- a/chrome/browser/sync/glue/data_type_manager_mock.h
+++ b/chrome/browser/sync/glue/data_type_manager_mock.h
@@ -7,44 +7,9 @@
#include "chrome/browser/sync/glue/data_type_manager.h"
#include "chrome/browser/sync/profile_sync_test_util.h"
-#include "content/public/browser/notification_details.h"
-#include "content/public/browser/notification_service.h"
-#include "content/public/browser/notification_types.h"
#include "sync/api/sync_error.h"
#include "testing/gmock/include/gmock/gmock.h"
-ACTION_P2(InvokeCallback, datatype, callback_result) {
- if (callback_result != browser_sync::DataTypeController::OK) {
- syncer::SyncError error(FROM_HERE, "Error message", datatype);
- arg0.Run(callback_result, error);
- } else {
- arg0.Run(callback_result, syncer::SyncError());
- }
-}
-
-ACTION_P3(InvokeCallbackPointer, callback, datatype, callback_result) {
- if (callback_result != browser_sync::DataTypeController::OK) {
- syncer::SyncError error(FROM_HERE, "Error message", datatype);
- callback.Run(callback_result, error);
- } else {
- callback.Run(callback_result, syncer::SyncError());
- }
-}
-
-ACTION_P3(NotifyFromDataTypeManagerWithResult, dtm, type, result) {
- content::NotificationService::current()->Notify(
- type,
- content::Source<browser_sync::DataTypeManager>(dtm),
- content::Details<const browser_sync::DataTypeManager::ConfigureResult>(
- result));
-}
-
-ACTION_P2(NotifyFromDataTypeManager, dtm, type) {
- content::NotificationService::current()->Notify(type,
- content::Source<browser_sync::DataTypeManager>(dtm),
- content::NotificationService::NoDetails());
-}
-
namespace browser_sync {
class DataTypeManagerMock : public DataTypeManager {
« no previous file with comments | « chrome/browser/sync/glue/data_type_manager_impl_unittest.cc ('k') | chrome/browser/sync/glue/data_type_manager_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698