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

Unified Diff: base/prefs/mock_pref_change_callback.cc

Issue 1645073005: Revert of Move base/prefs to components/prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « base/prefs/mock_pref_change_callback.h ('k') | base/prefs/overlay_user_pref_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/mock_pref_change_callback.cc
diff --git a/base/prefs/mock_pref_change_callback.cc b/base/prefs/mock_pref_change_callback.cc
new file mode 100644
index 0000000000000000000000000000000000000000..96b71974eb6ffdf652571a1f722a3be6cddf96f1
--- /dev/null
+++ b/base/prefs/mock_pref_change_callback.cc
@@ -0,0 +1,24 @@
+// 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.
+
+#include "base/prefs/mock_pref_change_callback.h"
+
+#include "base/bind.h"
+
+MockPrefChangeCallback::MockPrefChangeCallback(PrefService* prefs)
+ : prefs_(prefs) {
+}
+
+MockPrefChangeCallback::~MockPrefChangeCallback() {}
+
+PrefChangeRegistrar::NamedChangeCallback MockPrefChangeCallback::GetCallback() {
+ return base::Bind(&MockPrefChangeCallback::OnPreferenceChanged,
+ base::Unretained(this));
+}
+
+void MockPrefChangeCallback::Expect(const std::string& pref_name,
+ const base::Value* value) {
+ EXPECT_CALL(*this, OnPreferenceChanged(pref_name))
+ .With(PrefValueMatches(prefs_, pref_name, value));
+}
« no previous file with comments | « base/prefs/mock_pref_change_callback.h ('k') | base/prefs/overlay_user_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698