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/test | |
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/test')
-rw-r--r-- | chrome/test/testing_pref_service.cc | 14 | ||||
-rw-r--r-- | chrome/test/testing_pref_service.h | 12 | ||||
-rw-r--r-- | chrome/test/testing_pref_value_store.h | 26 |
3 files changed, 25 insertions, 27 deletions
diff --git a/chrome/test/testing_pref_service.cc b/chrome/test/testing_pref_service.cc index d8d08e5..f6ca03a 100644 --- a/chrome/test/testing_pref_service.cc +++ b/chrome/test/testing_pref_service.cc @@ -8,7 +8,19 @@ #include "chrome/browser/prefs/dummy_pref_store.h" #include "chrome/browser/prefs/pref_value_store.h" #include "chrome/browser/policy/configuration_policy_pref_store.h" -#include "chrome/test/testing_pref_value_store.h" + +TestingPrefService::TestingPrefValueStore::TestingPrefValueStore( + PrefStore* managed_platform_prefs, + PrefStore* device_management_prefs, + PrefStore* extension_prefs, + PrefStore* command_line_prefs, + PrefStore* user_prefs, + PrefStore* recommended_prefs, + PrefStore* default_prefs) + : PrefValueStore(managed_platform_prefs, device_management_prefs, + extension_prefs, command_line_prefs, + user_prefs, recommended_prefs, default_prefs, NULL) { +} // TODO(pamg): Instantiate no PrefStores by default. Allow callers to specify // which they want, and expand usage of this class to more unit tests. diff --git a/chrome/test/testing_pref_service.h b/chrome/test/testing_pref_service.h index 6c60fcf..069ff32 100644 --- a/chrome/test/testing_pref_service.h +++ b/chrome/test/testing_pref_service.h @@ -19,6 +19,18 @@ class PrefStore; // (managed, extension, user) conveniently. class TestingPrefService : public PrefService { public: + // Subclass to allow directly setting PrefStores. + class TestingPrefValueStore : public PrefValueStore { + public: + TestingPrefValueStore(PrefStore* managed_prefs, + PrefStore* device_management_prefs, + PrefStore* extension_prefs, + PrefStore* command_line_prefs, + PrefStore* user_prefs, + PrefStore* recommended_prefs, + PrefStore* default_prefs); + }; + // Create an empty instance. TestingPrefService(); diff --git a/chrome/test/testing_pref_value_store.h b/chrome/test/testing_pref_value_store.h deleted file mode 100644 index 01ae898..0000000 --- a/chrome/test/testing_pref_value_store.h +++ /dev/null @@ -1,26 +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. - -#ifndef CHROME_TEST_TESTING_PREF_VALUE_STORE_H_ -#define CHROME_TEST_TESTING_PREF_VALUE_STORE_H_ -#pragma once - -#include "chrome/browser/prefs/pref_value_store.h" - -// PrefValueStore subclass that allows directly setting PrefStores. -class TestingPrefValueStore : public PrefValueStore { - public: - TestingPrefValueStore(PrefStore* managed_platform_prefs, - PrefStore* device_management_prefs, - PrefStore* extension_prefs, - PrefStore* command_line_prefs, - PrefStore* user_prefs, - PrefStore* recommended_prefs, - PrefStore* default_prefs) - : PrefValueStore(managed_platform_prefs, device_management_prefs, - extension_prefs, command_line_prefs, - user_prefs, recommended_prefs, default_prefs, NULL) {} -}; - -#endif // CHROME_TEST_TESTING_PREF_VALUE_STORE_H_ |