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

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

Issue 132013002: Replace own callback handling with Promises. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits. Created 6 years, 11 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/manage_profile_browsertest.js ('k') | ui/webui/resources/js/util.js » ('j') | 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 1722b6459499fe77f6a8520bc5216f18282e281f..f86f6b9b76e4487c38bccf15df53d8ab36b5d291 100644
--- a/chrome/browser/ui/webui/options/managed_user_import_handler.cc
+++ b/chrome/browser/ui/webui/options/managed_user_import_handler.cc
@@ -122,9 +122,13 @@ void ManagedUserImportHandler::SendExistingManagedUsers(
DCHECK(dict);
const ProfileInfoCache& cache =
g_browser_process->profile_manager()->GetProfileInfoCache();
+
+ // Collect the ids of local supervised user profiles.
std::set<std::string> managed_user_ids;
- for (size_t i = 0; i < cache.GetNumberOfProfiles(); ++i)
- managed_user_ids.insert(cache.GetManagedUserIdOfProfileAtIndex(i));
+ for (size_t i = 0; i < cache.GetNumberOfProfiles(); ++i) {
+ if (cache.ProfileIsManagedAtIndex(i))
+ managed_user_ids.insert(cache.GetManagedUserIdOfProfileAtIndex(i));
+ }
base::ListValue managed_users;
for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) {
« no previous file with comments | « chrome/browser/ui/webui/options/manage_profile_browsertest.js ('k') | ui/webui/resources/js/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698