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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/json/json_reader.h" | 13 #include "base/json/json_reader.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/prefs/pref_service.h" | |
16 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
17 #include "base/values.h" | 16 #include "base/values.h" |
18 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
19 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" | 18 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" |
20 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 19 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
21 #include "chrome/browser/chromeos/settings/cros_settings.h" | 20 #include "chrome/browser/chromeos/settings/cros_settings.h" |
22 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
23 #include "chrome/browser/profiles/profile_metrics.h" | 22 #include "chrome/browser/profiles/profile_metrics.h" |
24 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" | 23 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" |
25 #include "chrome/grit/generated_resources.h" | 24 #include "chrome/grit/generated_resources.h" |
26 #include "chromeos/login/user_names.h" | 25 #include "chromeos/login/user_names.h" |
27 #include "chromeos/settings/cros_settings_names.h" | 26 #include "chromeos/settings/cros_settings_names.h" |
| 27 #include "components/prefs/pref_service.h" |
28 #include "components/user_manager/user_manager.h" | 28 #include "components/user_manager/user_manager.h" |
29 #include "content/public/browser/web_ui.h" | 29 #include "content/public/browser/web_ui.h" |
30 #include "google_apis/gaia/gaia_auth_util.h" | 30 #include "google_apis/gaia/gaia_auth_util.h" |
31 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
32 | 32 |
33 namespace chromeos { | 33 namespace chromeos { |
34 | 34 |
35 namespace { | 35 namespace { |
36 | 36 |
37 // Adds specified user to the whitelist. Returns false if that user is already | 37 // Adds specified user to the whitelist. Returns false if that user is already |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 new_list->AppendIfNotPresent(new base::StringValue((*it)->email())); | 172 new_list->AppendIfNotPresent(new base::StringValue((*it)->email())); |
173 | 173 |
174 if (OwnerSettingsServiceChromeOS* service = | 174 if (OwnerSettingsServiceChromeOS* service = |
175 OwnerSettingsServiceChromeOS::FromWebUI(web_ui())) { | 175 OwnerSettingsServiceChromeOS::FromWebUI(web_ui())) { |
176 service->Set(kAccountsPrefUsers, *new_list.get()); | 176 service->Set(kAccountsPrefUsers, *new_list.get()); |
177 } | 177 } |
178 } | 178 } |
179 | 179 |
180 } // namespace options | 180 } // namespace options |
181 } // namespace chromeos | 181 } // namespace chromeos |
OLD | NEW |