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

Side by Side Diff: components/prefs/mock_pref_change_callback.cc

Issue 1648403002: Move base/prefs to components/prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/prefs/mock_pref_change_callback.h" 5 #include "base/prefs/mock_pref_change_callback.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 8
9 MockPrefChangeCallback::MockPrefChangeCallback(PrefService* prefs) 9 MockPrefChangeCallback::MockPrefChangeCallback(PrefService* prefs)
10 : prefs_(prefs) { 10 : prefs_(prefs) {
11 } 11 }
12 12
13 MockPrefChangeCallback::~MockPrefChangeCallback() {} 13 MockPrefChangeCallback::~MockPrefChangeCallback() {}
14 14
15 PrefChangeRegistrar::NamedChangeCallback MockPrefChangeCallback::GetCallback() { 15 PrefChangeRegistrar::NamedChangeCallback MockPrefChangeCallback::GetCallback() {
16 return base::Bind(&MockPrefChangeCallback::OnPreferenceChanged, 16 return base::Bind(&MockPrefChangeCallback::OnPreferenceChanged,
17 base::Unretained(this)); 17 base::Unretained(this));
18 } 18 }
19 19
20 void MockPrefChangeCallback::Expect(const std::string& pref_name, 20 void MockPrefChangeCallback::Expect(const std::string& pref_name,
21 const base::Value* value) { 21 const base::Value* value) {
22 EXPECT_CALL(*this, OnPreferenceChanged(pref_name)) 22 EXPECT_CALL(*this, OnPreferenceChanged(pref_name))
23 .With(PrefValueMatches(prefs_, pref_name, value)); 23 .With(PrefValueMatches(prefs_, pref_name, value));
24 } 24 }
OLDNEW
« no previous file with comments | « components/prefs/mock_pref_change_callback.h ('k') | components/prefs/overlay_user_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698