summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authormnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-02 12:32:16 +0000
committermnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-02 12:32:16 +0000
commit87cc213e32c17d6cd593be45eb40fee4612e7b15 (patch)
tree203415f99c8d5c1ea0e089da117eab677a1848cb /chrome/test
parent32af00b4ee05844f9699599c1762b2aeb6674bce (diff)
downloadchromium_src-87cc213e32c17d6cd593be45eb40fee4612e7b15.zip
chromium_src-87cc213e32c17d6cd593be45eb40fee4612e7b15.tar.gz
chromium_src-87cc213e32c17d6cd593be45eb40fee4612e7b15.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67997 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/testing_pref_service.cc14
-rw-r--r--chrome/test/testing_pref_service.h12
-rw-r--r--chrome/test/testing_pref_value_store.h26
3 files changed, 27 insertions, 25 deletions
diff --git a/chrome/test/testing_pref_service.cc b/chrome/test/testing_pref_service.cc
index f6ca03a..d8d08e5 100644
--- a/chrome/test/testing_pref_service.cc
+++ b/chrome/test/testing_pref_service.cc
@@ -8,19 +8,7 @@
#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"
-
-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) {
-}
+#include "chrome/test/testing_pref_value_store.h"
// 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 069ff32..6c60fcf 100644
--- a/chrome/test/testing_pref_service.h
+++ b/chrome/test/testing_pref_service.h
@@ -19,18 +19,6 @@ 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
new file mode 100644
index 0000000..01ae898
--- /dev/null
+++ b/chrome/test/testing_pref_value_store.h
@@ -0,0 +1,26 @@
+// 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_