Fix SupervisedUserSettingsService initialization (issue #2093)

This commit is contained in:
Marshall Greenblatt 2017-02-13 17:12:57 -05:00
parent 903da5e452
commit 4054d66de0
2 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,6 @@ std::string ChromeProfileStub::GetProfileUserName() const {
}
Profile::ProfileType ChromeProfileStub::GetProfileType() const {
NOTREACHED();
return REGULAR_PROFILE;
}

View File

@ -38,6 +38,7 @@
#include "components/update_client/update_client.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/features/features.h"
#include "ui/base/l10n/l10n_util.h"
namespace browser_prefs {
@ -139,7 +140,7 @@ std::unique_ptr<PrefService> CreatePrefService(
factory.set_user_prefs(testing_pref_store.get());
}
#if defined(ENABLE_SUPERVISED_USERS)
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
// Used to store supervised user preferences.
SupervisedUserSettingsService* supervised_user_settings =
SupervisedUserSettingsServiceFactory::GetForProfile(profile);
@ -157,7 +158,7 @@ std::unique_ptr<PrefService> CreatePrefService(
new SupervisedUserPrefStore(supervised_user_settings));
DCHECK(supervised_user_prefs->IsInitializationComplete());
factory.set_supervised_user_prefs(supervised_user_prefs);
#endif // ENABLE_SUPERVISED_USERS
#endif // BUILDFLAG(ENABLE_SUPERVISED_USERS)
// Registry that will be populated with all known preferences. Preferences
// are registered with default values that may be changed via a *PrefStore.