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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1041 user_manager::UserManager::Get()->GetActiveUser()->GetAccountId())); | 1041 user_manager::UserManager::Get()->GetActiveUser()->GetAccountId())); |
1042 | 1042 |
1043 policy::ConsumerManagementService* consumer_management = | 1043 policy::ConsumerManagementService* consumer_management = |
1044 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> | 1044 g_browser_process->platform_part()->browser_policy_connector_chromeos()-> |
1045 GetConsumerManagementService(); | 1045 GetConsumerManagementService(); |
1046 if (consumer_management) { | 1046 if (consumer_management) { |
1047 OnConsumerManagementStatusChanged(); | 1047 OnConsumerManagementStatusChanged(); |
1048 consumer_management->AddObserver(this); | 1048 consumer_management->AddObserver(this); |
1049 } | 1049 } |
1050 | 1050 |
1051 if (!arc::ArcBridgeService::GetEnabled( | 1051 if (policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile) |
Thiemo Nagel
2016/02/12 17:32:08
Wouldn't that hide the ARC checkbox for all manage
Polina Bondarenko
2016/02/12 17:45:00
Do you mean that if ARC is enabled by policy, then
Thiemo Nagel
2016/02/12 17:53:32
Yes, sure. But in that case the checkbox shouldn'
| |
1052 ->IsManaged() || | |
1053 !arc::ArcBridgeService::GetEnabled( | |
1052 base::CommandLine::ForCurrentProcess()) || | 1054 base::CommandLine::ForCurrentProcess()) || |
1053 arc::ArcAuthService::IsOptInVerificationDisabled()) { | 1055 arc::ArcAuthService::IsOptInVerificationDisabled()) { |
1054 web_ui()->CallJavascriptFunction("BrowserOptions.hideAndroidAppsSection"); | 1056 web_ui()->CallJavascriptFunction("BrowserOptions.hideAndroidAppsSection"); |
1055 } | 1057 } |
1056 #endif | 1058 #endif |
1057 } | 1059 } |
1058 | 1060 |
1059 bool BrowserOptionsHandler::ShouldShowSetDefaultBrowser() { | 1061 bool BrowserOptionsHandler::ShouldShowSetDefaultBrowser() { |
1060 #if defined(OS_CHROMEOS) | 1062 #if defined(OS_CHROMEOS) |
1061 // We're always the default browser on ChromeOS. | 1063 // We're always the default browser on ChromeOS. |
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2145 | 2147 |
2146 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2148 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
2147 #if defined(OS_CHROMEOS) | 2149 #if defined(OS_CHROMEOS) |
2148 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2150 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
2149 #else | 2151 #else |
2150 return true; | 2152 return true; |
2151 #endif | 2153 #endif |
2152 } | 2154 } |
2153 | 2155 |
2154 } // namespace options | 2156 } // namespace options |
OLD | NEW |