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

Unified Diff: chrome/test/testing_pref_service.cc

Issue 6597070: Allow ProxyConfigService to report "no configuration set" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Eric's comments. Created 9 years, 9 months 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
« no previous file with comments | « chrome/test/testing_pref_service.h ('k') | net/proxy/polling_proxy_config_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/testing_pref_service.cc
diff --git a/chrome/test/testing_pref_service.cc b/chrome/test/testing_pref_service.cc
index 815ae1e60b89db57ce1d28533a689d9846820146..7d2a5c18dfadb4e78a59c7d07cc1ca9a30bcf6ee 100644
--- a/chrome/test/testing_pref_service.cc
+++ b/chrome/test/testing_pref_service.cc
@@ -13,17 +13,19 @@
TestingPrefServiceBase::TestingPrefServiceBase(
TestingPrefStore* managed_platform_prefs,
- TestingPrefStore* user_prefs)
+ TestingPrefStore* user_prefs,
+ TestingPrefStore* recommended_platform_prefs)
: PrefService(managed_platform_prefs,
NULL,
NULL,
NULL,
user_prefs,
- NULL,
+ recommended_platform_prefs,
NULL,
new DefaultPrefStore()),
managed_platform_prefs_(managed_platform_prefs),
- user_prefs_(user_prefs) {
+ user_prefs_(user_prefs),
+ recommended_platform_prefs_(recommended_platform_prefs) {
}
TestingPrefServiceBase::~TestingPrefServiceBase() {
@@ -53,6 +55,20 @@ void TestingPrefServiceBase::RemoveUserPref(const char* path) {
RemovePref(user_prefs_, path);
}
+const Value* TestingPrefServiceBase::GetRecommendedPref(
+ const char* path) const {
+ return GetPref(recommended_platform_prefs_, path);
+}
+
+void TestingPrefServiceBase::SetRecommendedPref(
+ const char* path, Value* value) {
+ SetPref(recommended_platform_prefs_, path, value);
+}
+
+void TestingPrefServiceBase::RemoveRecommendedPref(const char* path) {
+ RemovePref(recommended_platform_prefs_, path);
+}
+
const Value* TestingPrefServiceBase::GetPref(TestingPrefStore* pref_store,
const char* path) const {
const Value* res;
@@ -72,6 +88,7 @@ void TestingPrefServiceBase::RemovePref(TestingPrefStore* pref_store,
TestingPrefService::TestingPrefService()
: TestingPrefServiceBase(new TestingPrefStore(),
+ new TestingPrefStore(),
new TestingPrefStore()) {
}
« no previous file with comments | « chrome/test/testing_pref_service.h ('k') | net/proxy/polling_proxy_config_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698