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

Unified Diff: chrome/browser/prefs/pref_observer_mock.h

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit Created 8 years, 1 month 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
« no previous file with comments | « chrome/browser/prefs/pref_notifier_impl_unittest.cc ('k') | chrome/browser/prefs/pref_observer_mock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_observer_mock.h
diff --git a/chrome/browser/prefs/pref_observer_mock.h b/chrome/browser/prefs/pref_observer_mock.h
index 9697d24a3a15dba5f2eeac18bb57b8937cf39b43..be7f4ff455b54e0371e0f68c999de048d5f3cabb 100644
--- a/chrome/browser/prefs/pref_observer_mock.h
+++ b/chrome/browser/prefs/pref_observer_mock.h
@@ -7,11 +7,8 @@
#include <string>
+#include "base/prefs/public/pref_observer.h"
#include "chrome/browser/prefs/pref_service.h"
-#include "content/public/browser/notification_details.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_source.h"
-#include "content/public/browser/notification_types.h"
#include "testing/gmock/include/gmock/gmock.h"
using testing::Pointee;
@@ -22,7 +19,7 @@ using testing::Truly;
// |pref_name| in |prefs| matches |value|. If |value| is NULL, the matcher
// checks that the value is not set.
MATCHER_P3(PrefValueMatches, prefs, pref_name, value, "") {
- const PrefService::Preference* pref =
+ const PrefServiceBase::Preference* pref =
prefs->FindPreference(pref_name.c_str());
if (!pref)
return false;
@@ -36,16 +33,14 @@ MATCHER_P3(PrefValueMatches, prefs, pref_name, value, "") {
}
// A mock for testing preference notifications and easy setup of expectations.
-class PrefObserverMock : public content::NotificationObserver {
+class PrefObserverMock : public PrefObserver {
public:
PrefObserverMock();
virtual ~PrefObserverMock();
- MOCK_METHOD3(Observe, void(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details));
+ MOCK_METHOD2(OnPreferenceChanged, void(PrefServiceBase*, const std::string&));
- void Expect(const PrefService* prefs,
+ void Expect(PrefServiceBase* prefs,
const std::string& pref_name,
const Value* value);
};
« no previous file with comments | « chrome/browser/prefs/pref_notifier_impl_unittest.cc ('k') | chrome/browser/prefs/pref_observer_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698