OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/create_profile_handler.h" | 5 #include "chrome/browser/ui/webui/options/create_profile_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
12 #include "base/prefs/pref_service.h" | |
13 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
14 #include "base/value_conversions.h" | 13 #include "base/value_conversions.h" |
15 #include "base/values.h" | 14 #include "base/values.h" |
16 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
17 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 16 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
18 #include "chrome/browser/profiles/profile_manager.h" | 17 #include "chrome/browser/profiles/profile_manager.h" |
19 #include "chrome/browser/profiles/profile_metrics.h" | 18 #include "chrome/browser/profiles/profile_metrics.h" |
20 #include "chrome/browser/profiles/profiles_state.h" | 19 #include "chrome/browser/profiles/profiles_state.h" |
21 #include "chrome/browser/sync/profile_sync_service_factory.h" | 20 #include "chrome/browser/sync/profile_sync_service_factory.h" |
22 #include "chrome/browser/ui/webui/options/options_handlers_helper.h" | 21 #include "chrome/browser/ui/webui/options/options_handlers_helper.h" |
23 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
24 #include "chrome/grit/generated_resources.h" | 23 #include "chrome/grit/generated_resources.h" |
25 #include "components/browser_sync/browser/profile_sync_service.h" | 24 #include "components/browser_sync/browser/profile_sync_service.h" |
| 25 #include "components/prefs/pref_service.h" |
26 #include "content/public/browser/web_ui.h" | 26 #include "content/public/browser/web_ui.h" |
27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
28 | 28 |
29 #if defined(ENABLE_SUPERVISED_USERS) | 29 #if defined(ENABLE_SUPERVISED_USERS) |
30 #include "chrome/browser/supervised_user/legacy/supervised_user_registration_uti
lity.h" | 30 #include "chrome/browser/supervised_user/legacy/supervised_user_registration_uti
lity.h" |
31 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" | 31 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" |
32 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service_fac
tory.h" | 32 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service_fac
tory.h" |
33 #include "chrome/browser/supervised_user/supervised_user_service.h" | 33 #include "chrome/browser/supervised_user/supervised_user_service.h" |
34 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 34 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
35 #endif | 35 #endif |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 for (size_t i = 0; i < cache.GetNumberOfProfiles(); ++i) { | 477 for (size_t i = 0; i < cache.GetNumberOfProfiles(); ++i) { |
478 if (existing_supervised_user_id == | 478 if (existing_supervised_user_id == |
479 cache.GetSupervisedUserIdOfProfileAtIndex(i)) | 479 cache.GetSupervisedUserIdOfProfileAtIndex(i)) |
480 return false; | 480 return false; |
481 } | 481 } |
482 return true; | 482 return true; |
483 } | 483 } |
484 #endif | 484 #endif |
485 | 485 |
486 } // namespace options | 486 } // namespace options |
OLD | NEW |