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..3b70f22afa60d2496e1635c0eca5a8feb691e31b 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 { |
@@ -58,6 +23,11 @@ class DataTypeManagerMock : public DataTypeManager { |
MOCK_METHOD0(Stop, void()); |
MOCK_METHOD0(controllers, const DataTypeController::TypeMap&()); |
MOCK_CONST_METHOD0(state, State()); |
+ MOCK_CONST_METHOD0(last_configure_result, const ConfigureResult&()); |
+ |
+ MOCK_METHOD1(AddObserver, void(Observer*)); |
+ MOCK_METHOD1(RemoveObserver, void(Observer*)); |
+ MOCK_CONST_METHOD1(HasObserver, bool(Observer*)); |
private: |
browser_sync::DataTypeManager::ConfigureResult result_; |