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

Unified Diff: chrome/browser/ui/webui/options/managed_user_import_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
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/managed_user_import_handler.cc
diff --git a/chrome/browser/ui/webui/options/managed_user_import_handler.cc b/chrome/browser/ui/webui/options/managed_user_import_handler.cc
index 776b4008090562b87d85c7850f77677557d42723..67f3523827bff6ee43ec4e6c3db2932d27edfb47 100644
--- a/chrome/browser/ui/webui/options/managed_user_import_handler.cc
+++ b/chrome/browser/ui/webui/options/managed_user_import_handler.cc
@@ -10,6 +10,8 @@
#include "base/prefs/pref_service.h"
#include "base/values.h"
#include "chrome/browser/browser_process.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/profiles/profile.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -60,7 +62,7 @@ void ManagedUserImportHandler::RequestExistingManagedUsers(
managed_user_ids.insert(cache.GetManagedUserIdOfProfileAtIndex(i));
const DictionaryValue* dict =
- profile->GetPrefs()->GetDictionary(prefs::kManagedUsers);
+ ManagedUserSyncServiceFactory::GetForProfile(profile)->GetManagedUsers();
ListValue managed_users;
for (DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) {
const DictionaryValue* value = NULL;
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698