Index: chrome/browser/policy/policy_prefs_browsertest.cc |
diff --git a/chrome/browser/policy/policy_prefs_browsertest.cc b/chrome/browser/policy/policy_prefs_browsertest.cc |
index 5d577f49d90f34d84e5966cf2b2251117efe73f9..b004e5156a24d6b681cdf62917946f14ae048ab5 100644 |
--- a/chrome/browser/policy/policy_prefs_browsertest.cc |
+++ b/chrome/browser/policy/policy_prefs_browsertest.cc |
@@ -430,8 +430,10 @@ IN_PROC_BROWSER_TEST_P(PolicyPrefsTest, PolicyToPrefsMapping) { |
if (StartsWithASCII((*pref_mapping)->pref(), kCrosSettingsPrefix, true)) |
continue; |
+ PrefService* local_state = g_browser_process->local_state(); |
+ PrefService* user_prefs = browser()->profile()->GetPrefs(); |
PrefService* prefs = (*pref_mapping)->is_local_state() ? |
- g_browser_process->local_state() : browser()->profile()->GetPrefs(); |
+ local_state : user_prefs; |
// The preference must have been registered. |
const PrefService::Preference* pref = |
prefs->FindPreference((*pref_mapping)->pref().c_str()); |
@@ -520,8 +522,10 @@ IN_PROC_BROWSER_TEST_P(PolicyPrefsTest, CheckPolicyIndicators) { |
if (!policy_test_case->can_be_recommended()) |
continue; |
+ PrefService* local_state = g_browser_process->local_state(); |
+ PrefService* user_prefs = browser()->profile()->GetPrefs(); |
PrefService* prefs = (*pref_mapping)->is_local_state() ? |
- g_browser_process->local_state() : browser()->profile()->GetPrefs(); |
+ local_state : user_prefs; |
// The preference must have been registered. |
const PrefService::Preference* pref = |
prefs->FindPreference((*pref_mapping)->pref().c_str()); |