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