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

Unified Diff: chrome/browser/managed_mode/managed_user_service.cc

Issue 22677002: Notify ThemeService via callback when supervised user is ready. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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/browser/managed_mode/managed_user_service.cc
diff --git a/chrome/browser/managed_mode/managed_user_service.cc b/chrome/browser/managed_mode/managed_user_service.cc
index 90ad387264468304af96fa1e4a2b31797ae5c9c6..00795f32d90505f0ee37858142263ce4573f98e5 100644
--- a/chrome/browser/managed_mode/managed_user_service.cc
+++ b/chrome/browser/managed_mode/managed_user_service.cc
@@ -261,6 +261,11 @@ void ManagedUserService::DidBlockNavigation(
}
}
+void ManagedUserService::AddManagedUserInitCallback(
+ const base::Closure& callback) {
+ managed_user_init_callbacks_.push_back(callback);
+}
+
std::string ManagedUserService::GetDebugPolicyProviderName() const {
// Save the string space in official builds.
#ifdef NDEBUG
@@ -570,6 +575,15 @@ void ManagedUserService::Init() {
UpdateSiteLists();
UpdateManualHosts();
UpdateManualURLs();
+
+ // Call the callbacks to notify that the ManagedUserService has been
+ // initialized.
+ for (std::vector<base::Closure>::iterator it =
+ managed_user_init_callbacks_.begin();
+ it != managed_user_init_callbacks_.end();
+ ++it) {
+ it->Run();
+ }
}
void ManagedUserService::RegisterAndInitSync(

Powered by Google App Engine
This is Rietveld 408576698