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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 12340111: Introduce //components/user_prefs, use to eliminate c/b/prefs dependency in Autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge of LKGR Created 7 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/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 75f27cef311d12526634bb1ef169e9a4adf4ad3c..561c0f00f23318de4ad038509c3eb39a5dd6f110 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -55,6 +55,7 @@
#include "chrome/test/base/history_index_restore_observer.h"
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
@@ -271,6 +272,9 @@ void TestingProfile::CreateTempProfileDir() {
}
void TestingProfile::Init() {
+ if (prefs_.get())
+ components::UserPrefs::Set(this, prefs_.get());
+
if (!file_util::PathExists(profile_path_))
file_util::CreateDirectory(profile_path_);
@@ -559,6 +563,7 @@ void TestingProfile::CreateTestingPrefService() {
DCHECK(!prefs_.get());
testing_prefs_ = new TestingPrefServiceSyncable();
prefs_.reset(testing_prefs_);
+ components::UserPrefs::Set(this, prefs_.get());
chrome::RegisterUserPrefs(testing_prefs_->registry());
}

Powered by Google App Engine
This is Rietveld 408576698