OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/json/json_reader.h" | 11 #include "base/json/json_reader.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/prefs/pref_service.h" |
13 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
14 #include "base/values.h" | 15 #include "base/values.h" |
15 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
16 #include "chrome/browser/chromeos/login/user_manager.h" | 17 #include "chrome/browser/chromeos/login/user_manager.h" |
17 #include "chrome/browser/chromeos/settings/cros_settings.h" | 18 #include "chrome/browser/chromeos/settings/cros_settings.h" |
18 #include "chrome/browser/chromeos/settings/cros_settings_names.h" | 19 #include "chrome/browser/chromeos/settings/cros_settings_names.h" |
19 #include "chrome/browser/policy/browser_policy_connector.h" | 20 #include "chrome/browser/policy/browser_policy_connector.h" |
20 #include "chrome/browser/prefs/pref_service.h" | |
21 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" | 21 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" |
22 #include "content/public/browser/web_ui.h" | 22 #include "content/public/browser/web_ui.h" |
23 #include "google_apis/gaia/gaia_auth_util.h" | 23 #include "google_apis/gaia/gaia_auth_util.h" |
24 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
25 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
26 | 26 |
27 namespace chromeos { | 27 namespace chromeos { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 130 |
131 const UserList& users = UserManager::Get()->GetUsers(); | 131 const UserList& users = UserManager::Get()->GetUsers(); |
132 for (UserList::const_iterator it = users.begin(); it < users.end(); ++it) | 132 for (UserList::const_iterator it = users.begin(); it < users.end(); ++it) |
133 new_list->AppendIfNotPresent(new base::StringValue((*it)->email())); | 133 new_list->AppendIfNotPresent(new base::StringValue((*it)->email())); |
134 | 134 |
135 cros_settings->Set(kAccountsPrefUsers, *new_list.get()); | 135 cros_settings->Set(kAccountsPrefUsers, *new_list.get()); |
136 } | 136 } |
137 | 137 |
138 } // namespace options | 138 } // namespace options |
139 } // namespace chromeos | 139 } // namespace chromeos |
OLD | NEW |