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

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

Issue 902833003: Add a HostContentSettingsMap layer for Supervised Users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Comments Created 5 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 3f5e7e69121538c976a76782667b3ba9bf21b1b6..953b21f96a42300f41c5692b47ecd46bdd9de867 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -107,6 +107,7 @@
#endif
#if defined(ENABLE_SUPERVISED_USERS)
+#include "chrome/browser/content_settings/content_settings_supervised_provider.h"
#include "chrome/browser/supervised_user/supervised_user_constants.h"
#include "chrome/browser/supervised_user/supervised_user_settings_service.h"
#include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h"
@@ -919,6 +920,18 @@ HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() {
host_content_settings_map_.get());
}
#endif
+#if defined(ENABLE_SUPERVISED_USERS)
+ SupervisedUserSettingsService* supervised_service =
Bernhard Bauer 2015/02/26 18:03:54 Hm... I'm not sure if a testing profile actually n
knn 2015/02/27 10:43:53 Removed as there are no tests testing supervised u
+ SupervisedUserSettingsServiceFactory::GetForProfile(this);
+ scoped_ptr<content_settings::SupervisedProvider> supervised_provider(
+ new content_settings::SupervisedProvider());
+ supervised_service->Subscribe(base::Bind(
+ &content_settings::SupervisedProvider::OnSupervisedSettingsAvailable,
+ base::Unretained(supervised_provider.get())));
+ host_content_settings_map_->RegisterProvider(
+ HostContentSettingsMap::SUPERVISED_PROVIDER,
+ supervised_provider.Pass());
+#endif
}
return host_content_settings_map_.get();
}

Powered by Google App Engine
This is Rietveld 408576698