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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 23910002: Add synchronous and asynchronous methods to ManagedUserSyncService to get the list of managed users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment 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/browser/ui/webui/options/browser_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index 9e42d8cbdef0c002fd94897f23799a262f169591..25e3dc318eb3e9e85cc81e4e7f2445cf8a8eb726 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -31,6 +31,8 @@
#include "chrome/browser/managed_mode/managed_user_registration_utility.h"
#include "chrome/browser/managed_mode/managed_user_service.h"
#include "chrome/browser/managed_mode/managed_user_service_factory.h"
+#include "chrome/browser/managed_mode/managed_user_sync_service.h"
+#include "chrome/browser/managed_mode/managed_user_sync_service_factory.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/prefs/session_startup_pref.h"
#include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
@@ -1845,9 +1847,9 @@ bool BrowserOptionsHandler::IsValidExistingManagedUserId(
return false;
}
- DictionaryPrefUpdate update(Profile::FromWebUI(web_ui())->GetPrefs(),
- prefs::kManagedUsers);
- DictionaryValue* dict = update.Get();
+ Profile* profile = Profile::FromWebUI(web_ui());
+ const DictionaryValue* dict =
+ ManagedUserSyncServiceFactory::GetForProfile(profile)->GetManagedUsers();
if (!dict->HasKey(existing_managed_user_id))
return false;

Powered by Google App Engine
This is Rietveld 408576698