| 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 <utility> | 10 #include <utility> |
| (...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1210 ->GetPolicies(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, | 1210 ->GetPolicies(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, |
| 1211 std::string())) | 1211 std::string())) |
| 1212 .Get(policy::key::kUserAvatarImage)); | 1212 .Get(policy::key::kUserAvatarImage)); |
| 1213 | 1213 |
| 1214 OnWallpaperManagedChanged( | 1214 OnWallpaperManagedChanged( |
| 1215 chromeos::WallpaperManager::Get()->IsPolicyControlled( | 1215 chromeos::WallpaperManager::Get()->IsPolicyControlled( |
| 1216 user->GetAccountId())); | 1216 user->GetAccountId())); |
| 1217 | 1217 |
| 1218 if (arc::IsArcAllowedForProfile(profile) && | 1218 if (arc::IsArcAllowedForProfile(profile) && |
| 1219 !arc::IsArcOptInVerificationDisabled()) { | 1219 !arc::IsArcOptInVerificationDisabled()) { |
| 1220 base::Value is_arc_enabled(arc::IsArcPlayStoreEnabledForProfile(profile)); | 1220 base::Value is_play_store_enabled( |
| 1221 arc::IsArcPlayStoreEnabledForProfile(profile)); |
| 1221 web_ui()->CallJavascriptFunctionUnsafe( | 1222 web_ui()->CallJavascriptFunctionUnsafe( |
| 1222 "BrowserOptions.showAndroidAppsSection", | 1223 "BrowserOptions.showAndroidAppsSection", is_play_store_enabled); |
| 1223 is_arc_enabled); | |
| 1224 // Get the initial state of Android Settings app readiness. | 1224 // Get the initial state of Android Settings app readiness. |
| 1225 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = | 1225 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = |
| 1226 ArcAppListPrefs::Get(profile)->GetApp(arc::kSettingsAppId); | 1226 ArcAppListPrefs::Get(profile)->GetApp(arc::kSettingsAppId); |
| 1227 if (app_info && app_info->ready) | 1227 if (app_info && app_info->ready) |
| 1228 UpdateAndroidSettingsAppState(app_info->ready); | 1228 UpdateAndroidSettingsAppState(app_info->ready); |
| 1229 } | 1229 } |
| 1230 | 1230 |
| 1231 OnSystemTimezoneAutomaticDetectionPolicyChanged(); | 1231 OnSystemTimezoneAutomaticDetectionPolicyChanged(); |
| 1232 #endif | 1232 #endif |
| 1233 } | 1233 } |
| (...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2352 | 2352 |
| 2353 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2353 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
| 2354 #if defined(OS_CHROMEOS) | 2354 #if defined(OS_CHROMEOS) |
| 2355 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2355 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
| 2356 #else | 2356 #else |
| 2357 return true; | 2357 return true; |
| 2358 #endif | 2358 #endif |
| 2359 } | 2359 } |
| 2360 | 2360 |
| 2361 } // namespace options | 2361 } // namespace options |
| OLD | NEW |