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

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: Rebase to ToT and address nits. 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
« no previous file with comments | « chrome/browser/managed_mode/managed_user_service.h ('k') | chrome/browser/themes/theme_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7aeed2933fd3493745f160122dd5902f3666548b..f42f768bbf590086268c28cad62ae8dba4754ed7 100644
--- a/chrome/browser/managed_mode/managed_user_service.cc
+++ b/chrome/browser/managed_mode/managed_user_service.cc
@@ -277,6 +277,11 @@ void ManagedUserService::DidBlockNavigation(
}
}
+void ManagedUserService::AddInitCallback(
+ const base::Closure& callback) {
+ init_callbacks_.push_back(callback);
+}
+
std::string ManagedUserService::GetDebugPolicyProviderName() const {
// Save the string space in official builds.
#ifdef NDEBUG
@@ -596,6 +601,14 @@ void ManagedUserService::Init() {
UpdateSiteLists();
UpdateManualHosts();
UpdateManualURLs();
+
+ // Call the callbacks to notify that the ManagedUserService has been
+ // initialized.
+ for (std::vector<base::Closure>::iterator it = init_callbacks_.begin();
+ it != init_callbacks_.end();
+ ++it) {
+ it->Run();
+ }
}
void ManagedUserService::RegisterAndInitSync(
« no previous file with comments | « chrome/browser/managed_mode/managed_user_service.h ('k') | chrome/browser/themes/theme_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698