diff options
author | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-02 12:42:29 +0000 |
---|---|---|
committer | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-02 12:42:29 +0000 |
commit | b384cd63d4cac40e4bb5b8386c0980b2cb6f6d86 (patch) | |
tree | c5346bad76e1c3e17da136cb5bda8683a1d1b8a9 /chrome/browser/prefs | |
parent | 87cc213e32c17d6cd593be45eb40fee4612e7b15 (diff) | |
download | chromium_src-b384cd63d4cac40e4bb5b8386c0980b2cb6f6d86.zip chromium_src-b384cd63d4cac40e4bb5b8386c0980b2cb6f6d86.tar.gz chromium_src-b384cd63d4cac40e4bb5b8386c0980b2cb6f6d86.tar.bz2 |
Revert 67997 - Reduce the include footprint of pref_service.h
This removes the pref_value_store.h header from the pref_service.h
include list and cleans up any users that were getting the MessageLoop
and BrowserThread definitions indirectly through pref_service.h
BUG=64893
TEST=compiles and passes tests
Review URL: http://codereview.chromium.org/5461001
TBR=mnissler@chromium.org
Review URL: http://codereview.chromium.org/5575001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67998 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/prefs')
-rw-r--r-- | chrome/browser/prefs/pref_change_registrar.cc | 1 | ||||
-rw-r--r-- | chrome/browser/prefs/pref_change_registrar_unittest.cc | 1 | ||||
-rw-r--r-- | chrome/browser/prefs/pref_service.cc | 6 | ||||
-rw-r--r-- | chrome/browser/prefs/pref_service.h | 5 | ||||
-rw-r--r-- | chrome/browser/prefs/pref_value_store_unittest.cc | 6 | ||||
-rw-r--r-- | chrome/browser/prefs/scoped_pref_update.cc | 1 |
6 files changed, 5 insertions, 15 deletions
diff --git a/chrome/browser/prefs/pref_change_registrar.cc b/chrome/browser/prefs/pref_change_registrar.cc index 5655a8e..05372b1 100644 --- a/chrome/browser/prefs/pref_change_registrar.cc +++ b/chrome/browser/prefs/pref_change_registrar.cc @@ -4,7 +4,6 @@ #include "chrome/browser/prefs/pref_change_registrar.h" -#include "base/logging.h" #include "chrome/browser/prefs/pref_service.h" PrefChangeRegistrar::PrefChangeRegistrar() : service_(NULL) {} diff --git a/chrome/browser/prefs/pref_change_registrar_unittest.cc b/chrome/browser/prefs/pref_change_registrar_unittest.cc index 31c513b..8096ee6 100644 --- a/chrome/browser/prefs/pref_change_registrar_unittest.cc +++ b/chrome/browser/prefs/pref_change_registrar_unittest.cc @@ -6,7 +6,6 @@ #include "chrome/common/notification_details.h" #include "chrome/common/notification_observer.h" #include "chrome/common/notification_source.h" -#include "chrome/common/notification_type.h" #include "chrome/common/pref_names.h" #include "chrome/test/testing_pref_service.h" #include "testing/gmock/include/gmock/gmock.h" diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc index 89d7e78..a1baf43 100644 --- a/chrome/browser/prefs/pref_service.cc +++ b/chrome/browser/prefs/pref_service.cc @@ -21,8 +21,6 @@ #include "base/utf_string_conversions.h" #include "build/build_config.h" #include "chrome/browser/browser_thread.h" -#include "chrome/browser/prefs/pref_notifier.h" -#include "chrome/browser/prefs/pref_value_store.h" #include "chrome/browser/profile.h" #include "chrome/common/notification_service.h" #include "grit/chromium_strings.h" @@ -355,10 +353,6 @@ const ListValue* PrefService::GetList(const char* path) const { return static_cast<const ListValue*>(value); } -bool PrefService::ReadOnly() const { - return pref_value_store_->ReadOnly(); -} - void PrefService::AddPrefObserver(const char* path, NotificationObserver* obs) { pref_notifier_->AddPrefObserver(path, obs); diff --git a/chrome/browser/prefs/pref_service.h b/chrome/browser/prefs/pref_service.h index 632bc84..f1128a22 100644 --- a/chrome/browser/prefs/pref_service.h +++ b/chrome/browser/prefs/pref_service.h @@ -12,16 +12,15 @@ #include <string> #include "base/non_thread_safe.h" -#include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "base/values.h" +#include "chrome/browser/prefs/pref_value_store.h" #include "chrome/common/pref_store.h" class FilePath; class NotificationObserver; class PrefChangeObserver; class PrefNotifier; -class PrefValueStore; class Profile; namespace subtle { @@ -219,7 +218,7 @@ class PrefService : public NonThreadSafe { // preference is not registered. const Preference* FindPreference(const char* pref_name) const; - bool ReadOnly() const; + bool read_only() const { return pref_value_store_->ReadOnly(); } PrefNotifier* pref_notifier() const { return pref_notifier_.get(); } diff --git a/chrome/browser/prefs/pref_value_store_unittest.cc b/chrome/browser/prefs/pref_value_store_unittest.cc index b67fc05..cbf7ccc 100644 --- a/chrome/browser/prefs/pref_value_store_unittest.cc +++ b/chrome/browser/prefs/pref_value_store_unittest.cc @@ -9,7 +9,7 @@ #include "chrome/browser/prefs/dummy_pref_store.h" #include "chrome/browser/prefs/pref_value_store.h" #include "chrome/common/pref_names.h" -#include "chrome/test/testing_pref_value_store.h" +#include "chrome/test/testing_pref_service.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -113,7 +113,7 @@ class PrefValueStoreTest : public testing::Test { default_pref_store_->set_prefs(default_prefs_); // Create a new pref-value-store. - pref_value_store_ = new TestingPrefValueStore( + pref_value_store_ = new TestingPrefService::TestingPrefValueStore( managed_platform_pref_store_, device_management_pref_store_, extension_pref_store_, @@ -262,7 +262,7 @@ class PrefValueStoreTest : public testing::Test { MessageLoop loop_; - scoped_refptr<TestingPrefValueStore> pref_value_store_; + scoped_refptr<TestingPrefService::TestingPrefValueStore> pref_value_store_; // |PrefStore|s are owned by the |PrefValueStore|. DummyPrefStore* managed_platform_pref_store_; diff --git a/chrome/browser/prefs/scoped_pref_update.cc b/chrome/browser/prefs/scoped_pref_update.cc index 05a607c..bc77b28 100644 --- a/chrome/browser/prefs/scoped_pref_update.cc +++ b/chrome/browser/prefs/scoped_pref_update.cc @@ -4,7 +4,6 @@ #include "chrome/browser/prefs/scoped_pref_update.h" -#include "chrome/browser/prefs/pref_notifier.h" #include "chrome/browser/prefs/pref_service.h" ScopedPrefUpdate::ScopedPrefUpdate(PrefService* service, const char* path) |