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

Side by Side Diff: components/prefs/pref_store_observer_mock.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
« no previous file with comments | « components/prefs/pref_store_observer_mock.h ('k') | components/prefs/pref_value_map.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/pref_store_observer_mock.h" 5 #include "base/prefs/pref_store_observer_mock.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 PrefStoreObserverMock::PrefStoreObserverMock() 9 PrefStoreObserverMock::PrefStoreObserverMock()
10 : initialized(false), initialization_success(false) {} 10 : initialized(false), initialization_success(false) {}
11 11
12 PrefStoreObserverMock::~PrefStoreObserverMock() {} 12 PrefStoreObserverMock::~PrefStoreObserverMock() {}
13 13
14 void PrefStoreObserverMock::VerifyAndResetChangedKey( 14 void PrefStoreObserverMock::VerifyAndResetChangedKey(
15 const std::string& expected) { 15 const std::string& expected) {
16 EXPECT_EQ(1u, changed_keys.size()); 16 EXPECT_EQ(1u, changed_keys.size());
17 if (changed_keys.size() >= 1) 17 if (changed_keys.size() >= 1)
18 EXPECT_EQ(expected, changed_keys.front()); 18 EXPECT_EQ(expected, changed_keys.front());
19 changed_keys.clear(); 19 changed_keys.clear();
20 } 20 }
21 21
22 void PrefStoreObserverMock::OnPrefValueChanged(const std::string& key) { 22 void PrefStoreObserverMock::OnPrefValueChanged(const std::string& key) {
23 changed_keys.push_back(key); 23 changed_keys.push_back(key);
24 } 24 }
25 25
26 void PrefStoreObserverMock::OnInitializationCompleted(bool success) { 26 void PrefStoreObserverMock::OnInitializationCompleted(bool success) {
27 initialized = true; 27 initialized = true;
28 initialization_success = success; 28 initialization_success = success;
29 } 29 }
OLDNEW
« no previous file with comments | « components/prefs/pref_store_observer_mock.h ('k') | components/prefs/pref_value_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698