| 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 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1217 ->GetPolicies(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, | 1217 ->GetPolicies(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, |
| 1218 std::string())) | 1218 std::string())) |
| 1219 .Get(policy::key::kUserAvatarImage)); | 1219 .Get(policy::key::kUserAvatarImage)); |
| 1220 | 1220 |
| 1221 OnWallpaperManagedChanged( | 1221 OnWallpaperManagedChanged( |
| 1222 chromeos::WallpaperManager::Get()->IsPolicyControlled( | 1222 chromeos::WallpaperManager::Get()->IsPolicyControlled( |
| 1223 user->GetAccountId())); | 1223 user->GetAccountId())); |
| 1224 | 1224 |
| 1225 if (arc::IsArcAllowedForProfile(profile) && | 1225 if (arc::IsArcAllowedForProfile(profile) && |
| 1226 !arc::IsArcOptInVerificationDisabled()) { | 1226 !arc::IsArcOptInVerificationDisabled()) { |
| 1227 base::FundamentalValue is_arc_enabled( | 1227 base::FundamentalValue is_play_enabled( |
| 1228 arc::ArcSessionManager::Get()->IsArcPlayStoreEnabled()); | 1228 arc::ArcSessionManager::Get()->IsArcPlayStoreEnabled()); |
| 1229 web_ui()->CallJavascriptFunctionUnsafe( | 1229 web_ui()->CallJavascriptFunctionUnsafe( |
| 1230 "BrowserOptions.showAndroidAppsSection", | 1230 "BrowserOptions.showAndroidAppsSection", is_play_enabled); |
| 1231 is_arc_enabled); | |
| 1232 // Get the initial state of Android Settings app readiness. | 1231 // Get the initial state of Android Settings app readiness. |
| 1233 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = | 1232 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = |
| 1234 ArcAppListPrefs::Get(profile)->GetApp(arc::kSettingsAppId); | 1233 ArcAppListPrefs::Get(profile)->GetApp(arc::kSettingsAppId); |
| 1235 if (app_info && app_info->ready) | 1234 if (app_info && app_info->ready) |
| 1236 UpdateAndroidSettingsAppState(app_info->ready); | 1235 UpdateAndroidSettingsAppState(app_info->ready); |
| 1237 } | 1236 } |
| 1238 | 1237 |
| 1239 OnSystemTimezoneAutomaticDetectionPolicyChanged(); | 1238 OnSystemTimezoneAutomaticDetectionPolicyChanged(); |
| 1240 #endif | 1239 #endif |
| 1241 } | 1240 } |
| (...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2368 | 2367 |
| 2369 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2368 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
| 2370 #if defined(OS_CHROMEOS) | 2369 #if defined(OS_CHROMEOS) |
| 2371 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2370 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
| 2372 #else | 2371 #else |
| 2373 return true; | 2372 return true; |
| 2374 #endif | 2373 #endif |
| 2375 } | 2374 } |
| 2376 | 2375 |
| 2377 } // namespace options | 2376 } // namespace options |
| OLD | NEW |