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

Unified Diff: chrome/test/testing_profile.cc

Issue 6292017: Extended: Add "system" URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Continued Created 9 years, 10 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
Index: chrome/test/testing_profile.cc
diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc
index e7102df470bc0fd4dfb9ae062142d70647dcbca9..a009c4914a98dacf67a9e45a7052b2428a03b99f 100644
--- a/chrome/test/testing_profile.cc
+++ b/chrome/test/testing_profile.cc
@@ -495,7 +495,8 @@ void TestingProfile::CreateTestingPrefService() {
testing_prefs_ = new TestingPrefService();
prefs_.reset(testing_prefs_);
Profile::RegisterUserPrefs(prefs_.get());
- browser::RegisterAllPrefs(prefs_.get(), prefs_.get());
+ local_state_.reset(new TestingPrefService());
+ browser::RegisterAllPrefs(prefs_.get(), local_state_.get());
}
PrefService* TestingProfile::GetPrefs() {
@@ -505,6 +506,18 @@ PrefService* TestingProfile::GetPrefs() {
return prefs_.get();
}
+PrefService* TestingProfile::GetLocalState() {
+ if (!local_state_.get()) {
+ CreateTestingPrefService();
+ }
+ return local_state_.get();
+}
+
+void TestingProfile::SetLocalState(PrefService* local_state) {
+ DCHECK(!local_state_.get());
+ local_state_.reset(local_state);
+}
+
TemplateURLModel* TestingProfile::GetTemplateURLModel() {
return template_url_model_.get();
}
« chrome/browser/system_url_request_context_getter.cc ('K') | « chrome/test/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698