| 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/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 #if defined(OS_MACOSX) | 609 #if defined(OS_MACOSX) |
| 610 values->SetString("macPasswordsWarning", | 610 values->SetString("macPasswordsWarning", |
| 611 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_MAC_WARNING)); | 611 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_MAC_WARNING)); |
| 612 values->SetBoolean("multiple_profiles", | 612 values->SetBoolean("multiple_profiles", |
| 613 g_browser_process->profile_manager()->GetNumberOfProfiles() > 1); | 613 g_browser_process->profile_manager()->GetNumberOfProfiles() > 1); |
| 614 #endif | 614 #endif |
| 615 | 615 |
| 616 if (ShouldShowMultiProfilesUserList()) | 616 if (ShouldShowMultiProfilesUserList()) |
| 617 values->Set("profilesInfo", GetProfilesInfoList().release()); | 617 values->Set("profilesInfo", GetProfilesInfoList().release()); |
| 618 | 618 |
| 619 // Profile deletion is not allowed for supervised users, or any users | 619 // Profile deletion is not allowed for any users using Metro mode. |
| 620 // using Metro mode. | 620 bool allow_deletion = true; |
| 621 bool allow_deletion = !Profile::FromWebUI(web_ui())->IsSupervised(); | |
| 622 #if defined(USE_ASH) | 621 #if defined(USE_ASH) |
| 623 allow_deletion = allow_deletion && !ash::Shell::HasInstance(); | 622 allow_deletion = allow_deletion && !ash::Shell::HasInstance(); |
| 624 #endif | 623 #endif |
| 625 values->SetBoolean("allowProfileDeletion", allow_deletion); | 624 values->SetBoolean("allowProfileDeletion", allow_deletion); |
| 626 | 625 |
| 627 values->SetBoolean("profileIsGuest", | 626 values->SetBoolean("profileIsGuest", |
| 628 Profile::FromWebUI(web_ui())->IsOffTheRecord()); | 627 Profile::FromWebUI(web_ui())->IsOffTheRecord()); |
| 629 | 628 |
| 630 values->SetBoolean("profileIsSupervised", | 629 values->SetBoolean("profileIsSupervised", |
| 631 Profile::FromWebUI(web_ui())->IsSupervised()); | 630 Profile::FromWebUI(web_ui())->IsSupervised()); |
| (...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2126 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, | 2125 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, |
| 2127 const policy::PolicyMap& previous, | 2126 const policy::PolicyMap& previous, |
| 2128 const policy::PolicyMap& current) { | 2127 const policy::PolicyMap& current) { |
| 2129 std::set<std::string> different_keys; | 2128 std::set<std::string> different_keys; |
| 2130 current.GetDifferingKeys(previous, &different_keys); | 2129 current.GetDifferingKeys(previous, &different_keys); |
| 2131 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) | 2130 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) |
| 2132 SetupMetricsReportingCheckbox(); | 2131 SetupMetricsReportingCheckbox(); |
| 2133 } | 2132 } |
| 2134 | 2133 |
| 2135 } // namespace options | 2134 } // namespace options |
| OLD | NEW |