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

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

Issue 23376002: Move ManagedModePolicyProvider functionality to ManagedUserSettingsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 3 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 f53c423f91e34d28e56b3ee9ee497b50635c6201..b301b5ac2d6f91a50750a44f72c1b56409e89880 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -81,6 +81,11 @@
#include "chrome/browser/policy/policy_service_stub.h"
#endif // defined(ENABLE_CONFIGURATION_POLICY)
+#if defined(ENABLE_MANAGED_USERS)
+#include "chrome/browser/managed_mode/managed_user_settings_service.h"
+#include "chrome/browser/managed_mode/managed_user_settings_service_factory.h"
+#endif
+
using base::Time;
using content::BrowserThread;
using content::DownloadManagerDelegate;
@@ -332,6 +337,14 @@ void TestingProfile::Init() {
DesktopNotificationServiceFactory::GetInstance()->SetTestingFactory(
this, CreateTestDesktopNotificationService);
#endif
+
+#if defined(ENABLE_MANAGED_USERS)
+ ManagedUserSettingsService* settings_service =
+ ManagedUserSettingsServiceFactory::GetForProfile(this);
+ TestingPrefStore* store = new TestingPrefStore();
+ settings_service->Init(store);
+ store->SetInitializationCompleted();
+#endif
}
void TestingProfile::FinishInit() {
« chrome/browser/profiles/profile_impl.cc ('K') | « chrome/common/chrome_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698