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

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: Addressed comments 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
« chrome/browser/io_thread.cc ('K') | « chrome/test/testing_profile.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/testing_profile.cc
diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc
index 285338f4c25c9bdbd2eaadece2706c0f6fbddbba..db84a510c581759d69edd000be5cd32208d6a56d 100644
--- a/chrome/test/testing_profile.cc
+++ b/chrome/test/testing_profile.cc
@@ -497,7 +497,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() {
@@ -507,6 +508,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/io_thread.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