OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/options/chromeos/accounts_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/accounts_options_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/chromeos/cros_settings.h" | 14 #include "chrome/browser/chromeos/cros_settings.h" |
15 #include "chrome/browser/chromeos/cros_settings_names.h" | 15 #include "chrome/browser/chromeos/cros_settings_names.h" |
16 #include "chrome/browser/chromeos/login/authenticator.h" | 16 #include "chrome/browser/chromeos/login/authenticator.h" |
17 #include "chrome/browser/chromeos/login/user_manager.h" | 17 #include "chrome/browser/chromeos/login/user_manager.h" |
18 #include "chrome/browser/prefs/pref_service.h" | 18 #include "chrome/browser/prefs/pref_service.h" |
19 #include "chrome/browser/policy/browser_policy_connector.h" | 19 #include "chrome/browser/policy/browser_policy_connector.h" |
| 20 #include "content/browser/webui/web_ui.h" |
20 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
21 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
22 | 23 |
23 namespace chromeos { | 24 namespace chromeos { |
24 | 25 |
25 namespace { | 26 namespace { |
26 | 27 |
27 // Adds specified user to the whitelist. Returns false if that user is already | 28 // Adds specified user to the whitelist. Returns false if that user is already |
28 // in the whitelist. | 29 // in the whitelist. |
29 bool WhitelistUser(const std::string& username) { | 30 bool WhitelistUser(const std::string& username) { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 const base::ListValue* args) { | 123 const base::ListValue* args) { |
123 DCHECK(args && args->empty()); | 124 DCHECK(args && args->empty()); |
124 | 125 |
125 const UserList& users = UserManager::Get()->GetUsers(); | 126 const UserList& users = UserManager::Get()->GetUsers(); |
126 for (UserList::const_iterator it = users.begin(); it < users.end(); ++it) { | 127 for (UserList::const_iterator it = users.begin(); it < users.end(); ++it) { |
127 WhitelistUser((*it)->email()); | 128 WhitelistUser((*it)->email()); |
128 } | 129 } |
129 } | 130 } |
130 | 131 |
131 } // namespace chromeos | 132 } // namespace chromeos |
OLD | NEW |