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

Side by Side Diff: base/prefs/testing_pref_store.cc

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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 | « base/prefs/testing_pref_store.h ('k') | base/prefs/value_map_pref_store.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/testing_pref_store.h" 5 #include "base/prefs/testing_pref_store.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 9
10 TestingPrefStore::TestingPrefStore() 10 TestingPrefStore::TestingPrefStore()
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 DCHECK(!pending_async_read_); 82 DCHECK(!pending_async_read_);
83 error_delegate_.reset(error_delegate); 83 error_delegate_.reset(error_delegate);
84 if (block_async_read_) 84 if (block_async_read_)
85 pending_async_read_ = true; 85 pending_async_read_ = true;
86 else 86 else
87 NotifyInitializationCompleted(); 87 NotifyInitializationCompleted();
88 } 88 }
89 89
90 void TestingPrefStore::CommitPendingWrite() { committed_ = true; } 90 void TestingPrefStore::CommitPendingWrite() { committed_ = true; }
91 91
92 void TestingPrefStore::SchedulePendingLossyWrites() {}
93
92 void TestingPrefStore::SetInitializationCompleted() { 94 void TestingPrefStore::SetInitializationCompleted() {
93 NotifyInitializationCompleted(); 95 NotifyInitializationCompleted();
94 } 96 }
95 97
96 void TestingPrefStore::NotifyPrefValueChanged(const std::string& key) { 98 void TestingPrefStore::NotifyPrefValueChanged(const std::string& key) {
97 FOR_EACH_OBSERVER(Observer, observers_, OnPrefValueChanged(key)); 99 FOR_EACH_OBSERVER(Observer, observers_, OnPrefValueChanged(key));
98 } 100 }
99 101
100 void TestingPrefStore::NotifyInitializationCompleted() { 102 void TestingPrefStore::NotifyInitializationCompleted() {
101 DCHECK(!init_complete_); 103 DCHECK(!init_complete_);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 read_success_ = read_success; 167 read_success_ = read_success;
166 } 168 }
167 169
168 void TestingPrefStore::set_read_error( 170 void TestingPrefStore::set_read_error(
169 PersistentPrefStore::PrefReadError read_error) { 171 PersistentPrefStore::PrefReadError read_error) {
170 DCHECK(!init_complete_); 172 DCHECK(!init_complete_);
171 read_error_ = read_error; 173 read_error_ = read_error;
172 } 174 }
173 175
174 TestingPrefStore::~TestingPrefStore() {} 176 TestingPrefStore::~TestingPrefStore() {}
OLDNEW
« no previous file with comments | « base/prefs/testing_pref_store.h ('k') | base/prefs/value_map_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698