summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/extensions/extension_pref_store_unittest.cc4
-rw-r--r--chrome/browser/prefs/default_pref_store.cc21
-rw-r--r--chrome/browser/prefs/in_memory_pref_store.cc21
-rw-r--r--chrome/browser/prefs/in_memory_pref_store.h (renamed from chrome/browser/prefs/default_pref_store.h)19
-rw-r--r--chrome/browser/prefs/pref_notifier_unittest.cc4
-rw-r--r--chrome/browser/prefs/pref_service_unittest.cc1
-rw-r--r--chrome/browser/prefs/pref_value_store.cc4
-rw-r--r--chrome/chrome_browser.gypi4
8 files changed, 39 insertions, 39 deletions
diff --git a/chrome/browser/extensions/extension_pref_store_unittest.cc b/chrome/browser/extensions/extension_pref_store_unittest.cc
index 45b22d5..4c64546 100644
--- a/chrome/browser/extensions/extension_pref_store_unittest.cc
+++ b/chrome/browser/extensions/extension_pref_store_unittest.cc
@@ -9,7 +9,7 @@
#include "base/scoped_temp_dir.h"
#include "base/values.h"
#include "chrome/browser/extensions/extension_pref_store.h"
-#include "chrome/browser/prefs/default_pref_store.h"
+#include "chrome/browser/prefs/in_memory_pref_store.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/pref_value_store.h"
#include "chrome/common/extensions/extension.h"
@@ -337,7 +337,7 @@ TEST(ExtensionPrefStoreTest, NotifyWhenNeeded) {
using testing::Mock;
TestExtensionPrefStore* eps = new TestExtensionPrefStore;
- DefaultPrefStore* dps = new DefaultPrefStore;
+ InMemoryPrefStore* dps = new InMemoryPrefStore;
ASSERT_TRUE(eps->ext1 != NULL);
// The PrefValueStore takes ownership of the PrefStores; in this case, that's
diff --git a/chrome/browser/prefs/default_pref_store.cc b/chrome/browser/prefs/default_pref_store.cc
deleted file mode 100644
index a9e6861..0000000
--- a/chrome/browser/prefs/default_pref_store.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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/default_pref_store.h"
-
-#include "base/values.h"
-
-DefaultPrefStore::DefaultPrefStore() : prefs_(new DictionaryValue()) {
-}
-
-DefaultPrefStore::~DefaultPrefStore() {
-}
-
-DictionaryValue* DefaultPrefStore::prefs() const {
- return prefs_.get();
-}
-
-PrefStore::PrefReadError DefaultPrefStore::ReadPrefs() {
- return PrefStore::PREF_READ_ERROR_NONE;
-}
diff --git a/chrome/browser/prefs/in_memory_pref_store.cc b/chrome/browser/prefs/in_memory_pref_store.cc
new file mode 100644
index 0000000..1a2fcba
--- /dev/null
+++ b/chrome/browser/prefs/in_memory_pref_store.cc
@@ -0,0 +1,21 @@
+// 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/in_memory_pref_store.h"
+
+#include "base/values.h"
+
+InMemoryPrefStore::InMemoryPrefStore() : prefs_(new DictionaryValue()) {
+}
+
+InMemoryPrefStore::~InMemoryPrefStore() {
+}
+
+DictionaryValue* InMemoryPrefStore::prefs() const {
+ return prefs_.get();
+}
+
+PrefStore::PrefReadError InMemoryPrefStore::ReadPrefs() {
+ return PrefStore::PREF_READ_ERROR_NONE;
+}
diff --git a/chrome/browser/prefs/default_pref_store.h b/chrome/browser/prefs/in_memory_pref_store.h
index 6378aca..2558814 100644
--- a/chrome/browser/prefs/default_pref_store.h
+++ b/chrome/browser/prefs/in_memory_pref_store.h
@@ -2,20 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_PREFS_DEFAULT_PREF_STORE_H_
-#define CHROME_BROWSER_PREFS_DEFAULT_PREF_STORE_H_
+#ifndef CHROME_BROWSER_PREFS_IN_MEMORY_PREF_STORE_H_
+#define CHROME_BROWSER_PREFS_IN_MEMORY_PREF_STORE_H_
#pragma once
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "chrome/common/pref_store.h"
-// This PrefStore keeps track of default preference values set when a
-// preference is registered with the PrefService.
-class DefaultPrefStore : public PrefStore {
+// This PrefStore keeps track of preference values in memory and can be used,
+// e.g., for default preference values set when a preference is registered with
+// the PrefService.
+class InMemoryPrefStore : public PrefStore {
public:
- DefaultPrefStore();
- virtual ~DefaultPrefStore();
+ InMemoryPrefStore();
+ virtual ~InMemoryPrefStore();
// PrefStore methods:
virtual DictionaryValue* prefs() const;
@@ -25,7 +26,7 @@ class DefaultPrefStore : public PrefStore {
// The default preference values.
scoped_ptr<DictionaryValue> prefs_;
- DISALLOW_COPY_AND_ASSIGN(DefaultPrefStore);
+ DISALLOW_COPY_AND_ASSIGN(InMemoryPrefStore);
};
-#endif // CHROME_BROWSER_PREFS_DEFAULT_PREF_STORE_H_
+#endif // CHROME_BROWSER_PREFS_IN_MEMORY_PREF_STORE_H_
diff --git a/chrome/browser/prefs/pref_notifier_unittest.cc b/chrome/browser/prefs/pref_notifier_unittest.cc
index 6792ada..2fe4555 100644
--- a/chrome/browser/prefs/pref_notifier_unittest.cc
+++ b/chrome/browser/prefs/pref_notifier_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/prefs/default_pref_store.h"
+#include "chrome/browser/prefs/in_memory_pref_store.h"
#include "chrome/browser/prefs/pref_notifier.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prefs/pref_value_store.h"
@@ -62,7 +62,7 @@ class MockPrefValueStore : public PrefValueStore {
public:
MockPrefValueStore()
: PrefValueStore(NULL, NULL, NULL, NULL, NULL, NULL,
- new DefaultPrefStore(), NULL) {}
+ new InMemoryPrefStore(), NULL) {}
virtual ~MockPrefValueStore() {}
diff --git a/chrome/browser/prefs/pref_service_unittest.cc b/chrome/browser/prefs/pref_service_unittest.cc
index e7c737c..7fc4608 100644
--- a/chrome/browser/prefs/pref_service_unittest.cc
+++ b/chrome/browser/prefs/pref_service_unittest.cc
@@ -12,7 +12,6 @@
#include "chrome/browser/policy/mock_configuration_policy_provider.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/prefs/command_line_pref_store.h"
-#include "chrome/browser/prefs/default_pref_store.h"
#include "chrome/browser/prefs/dummy_pref_store.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/prefs/pref_value_store.h"
diff --git a/chrome/browser/prefs/pref_value_store.cc b/chrome/browser/prefs/pref_value_store.cc
index 81cb2b1..84b6919 100644
--- a/chrome/browser/prefs/pref_value_store.cc
+++ b/chrome/browser/prefs/pref_value_store.cc
@@ -8,7 +8,7 @@
#include "chrome/browser/extensions/extension_pref_store.h"
#include "chrome/browser/policy/configuration_policy_pref_store.h"
#include "chrome/browser/prefs/command_line_pref_store.h"
-#include "chrome/browser/prefs/default_pref_store.h"
+#include "chrome/browser/prefs/in_memory_pref_store.h"
#include "chrome/common/json_pref_store.h"
#include "chrome/common/notification_service.h"
@@ -48,7 +48,7 @@ PrefValueStore* PrefValueStore::CreatePrefValueStore(
JsonPrefStore* user = new JsonPrefStore(
pref_filename,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
- DefaultPrefStore* default_store = new DefaultPrefStore();
+ InMemoryPrefStore* default_store = new InMemoryPrefStore();
if (!user_only) {
managed =
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index cc6775f..6d5c3fa 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -1979,8 +1979,8 @@
'browser/prefs/browser_prefs.h',
'browser/prefs/command_line_pref_store.cc',
'browser/prefs/command_line_pref_store.h',
- 'browser/prefs/default_pref_store.cc',
- 'browser/prefs/default_pref_store.h',
+ 'browser/prefs/in_memory_pref_store.cc',
+ 'browser/prefs/in_memory_pref_store.h',
'browser/prefs/pref_member.cc',
'browser/prefs/pref_member.h',
'browser/prefs/pref_notifier.cc',