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 web_ui()->CallJavascriptFunction( |
1052 base::CommandLine::ForCurrentProcess()) || | 1052 "BrowserOptions.setAndroidAppsSectionAttributes", |
1053 arc::ArcAuthService::IsOptInVerificationDisabled()) { | 1053 base::FundamentalValue(!arc::ArcBridgeService::GetEnabled( |
1054 web_ui()->CallJavascriptFunction("BrowserOptions.hideAndroidAppsSection"); | 1054 base::CommandLine::ForCurrentProcess()) |
1055 } | 1055 || arc::ArcAuthService::IsOptInVerificationDisabled()), |
bartfab (slow)
2016/02/16 15:23:00
Nit: Indentation.
| |
1056 base::FundamentalValue( | |
1057 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile) | |
1058 ->IsManaged())); | |
bartfab (slow)
2016/02/16 15:23:00
Nit: Indentation.
| |
1056 #endif | 1059 #endif |
1057 } | 1060 } |
1058 | 1061 |
1059 bool BrowserOptionsHandler::ShouldShowSetDefaultBrowser() { | 1062 bool BrowserOptionsHandler::ShouldShowSetDefaultBrowser() { |
1060 #if defined(OS_CHROMEOS) | 1063 #if defined(OS_CHROMEOS) |
1061 // We're always the default browser on ChromeOS. | 1064 // We're always the default browser on ChromeOS. |
1062 return false; | 1065 return false; |
1063 #else | 1066 #else |
1064 Profile* profile = Profile::FromWebUI(web_ui()); | 1067 Profile* profile = Profile::FromWebUI(web_ui()); |
1065 return !profile->IsGuestSession(); | 1068 return !profile->IsGuestSession(); |
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2145 | 2148 |
2146 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2149 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
2147 #if defined(OS_CHROMEOS) | 2150 #if defined(OS_CHROMEOS) |
2148 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2151 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
2149 #else | 2152 #else |
2150 return true; | 2153 return true; |
2151 #endif | 2154 #endif |
2152 } | 2155 } |
2153 | 2156 |
2154 } // namespace options | 2157 } // namespace options |
OLD | NEW |