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

Unified Diff: chrome/browser/prefs/testing_pref_store.cc

Issue 5441002: Clean up pref change notification handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix extension prefs breakage Created 10 years 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
Index: chrome/browser/prefs/testing_pref_store.cc
diff --git a/chrome/browser/prefs/testing_pref_store.cc b/chrome/browser/prefs/testing_pref_store.cc
new file mode 100644
index 0000000000000000000000000000000000000000..519473757f0848e3ee794a3b1242c87843b89e3f
--- /dev/null
+++ b/chrome/browser/prefs/testing_pref_store.cc
@@ -0,0 +1,36 @@
+// Copyright (c) 2010 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 "chrome/browser/prefs/testing_pref_store.h"
+
+#include "base/values.h"
+
+TestingPrefStore::TestingPrefStore()
+ : prefs_(new DictionaryValue()),
+ read_only_(true),
+ prefs_written_(false),
+ init_complete_(false) { }
+
+PrefStore::PrefReadError TestingPrefStore::ReadPrefs() {
+ prefs_.reset(new DictionaryValue());
+ return PrefStore::PREF_READ_ERROR_NONE;
+}
+
+bool TestingPrefStore::WritePrefs() {
+ prefs_written_ = true;
+ return prefs_written_;
+}
+
+void TestingPrefStore::NotifyPrefValueChanged(const std::string& key) {
+ PrefStoreBase::NotifyPrefValueChanged(key);
+}
+
+void TestingPrefStore::NotifyInitializationCompleted() {
+ PrefStoreBase::NotifyInitializationCompleted();
+}
+
+void TestingPrefStore::SetInitializationCompleted() {
+ init_complete_ = true;
+ NotifyInitializationCompleted();
+}
« no previous file with comments | « chrome/browser/prefs/testing_pref_store.h ('k') | chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698