| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 #include "chrome/browser/ui/startup/default_browser_prompt.h" | 116 #include "chrome/browser/ui/startup/default_browser_prompt.h" |
| 117 #include "chrome/browser/ui/webui/settings_utils.h" | 117 #include "chrome/browser/ui/webui/settings_utils.h" |
| 118 #endif | 118 #endif |
| 119 | 119 |
| 120 #if defined(OS_CHROMEOS) | 120 #if defined(OS_CHROMEOS) |
| 121 #include "ash/common/accessibility_types.h" // nogncheck | 121 #include "ash/common/accessibility_types.h" // nogncheck |
| 122 #include "ash/common/system/chromeos/devicetype_utils.h" // nogncheck | 122 #include "ash/common/system/chromeos/devicetype_utils.h" // nogncheck |
| 123 #include "ash/shell.h" // nogncheck | 123 #include "ash/shell.h" // nogncheck |
| 124 #include "chrome/browser/browser_process_platform_part.h" | 124 #include "chrome/browser/browser_process_platform_part.h" |
| 125 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 125 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 126 #include "chrome/browser/chromeos/arc/arc_session_manager.h" | |
| 127 #include "chrome/browser/chromeos/arc/arc_util.h" | 126 #include "chrome/browser/chromeos/arc/arc_util.h" |
| 128 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h" | 127 #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h" |
| 129 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 128 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
| 130 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" | 129 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" |
| 131 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 130 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 132 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 131 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 133 #include "chrome/browser/chromeos/reset/metrics.h" | 132 #include "chrome/browser/chromeos/reset/metrics.h" |
| 134 #include "chrome/browser/chromeos/settings/cros_settings.h" | 133 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 135 #include "chrome/browser/chromeos/system/timezone_util.h" | 134 #include "chrome/browser/chromeos/system/timezone_util.h" |
| 136 #include "chrome/browser/policy/profile_policy_connector.h" | 135 #include "chrome/browser/policy/profile_policy_connector.h" |
| (...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 std::string())) | 1215 std::string())) |
| 1217 .Get(policy::key::kUserAvatarImage)); | 1216 .Get(policy::key::kUserAvatarImage)); |
| 1218 | 1217 |
| 1219 OnWallpaperManagedChanged( | 1218 OnWallpaperManagedChanged( |
| 1220 chromeos::WallpaperManager::Get()->IsPolicyControlled( | 1219 chromeos::WallpaperManager::Get()->IsPolicyControlled( |
| 1221 user->GetAccountId())); | 1220 user->GetAccountId())); |
| 1222 | 1221 |
| 1223 if (arc::IsArcAllowedForProfile(profile) && | 1222 if (arc::IsArcAllowedForProfile(profile) && |
| 1224 !arc::IsArcOptInVerificationDisabled()) { | 1223 !arc::IsArcOptInVerificationDisabled()) { |
| 1225 base::FundamentalValue is_arc_enabled( | 1224 base::FundamentalValue is_arc_enabled( |
| 1226 arc::ArcSessionManager::Get()->IsArcPlayStoreEnabled()); | 1225 arc::IsArcPlayStoreEnabledForProfile(profile)); |
| 1227 web_ui()->CallJavascriptFunctionUnsafe( | 1226 web_ui()->CallJavascriptFunctionUnsafe( |
| 1228 "BrowserOptions.showAndroidAppsSection", | 1227 "BrowserOptions.showAndroidAppsSection", |
| 1229 is_arc_enabled); | 1228 is_arc_enabled); |
| 1230 // Get the initial state of Android Settings app readiness. | 1229 // Get the initial state of Android Settings app readiness. |
| 1231 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = | 1230 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = |
| 1232 ArcAppListPrefs::Get(profile)->GetApp(arc::kSettingsAppId); | 1231 ArcAppListPrefs::Get(profile)->GetApp(arc::kSettingsAppId); |
| 1233 if (app_info && app_info->ready) | 1232 if (app_info && app_info->ready) |
| 1234 UpdateAndroidSettingsAppState(app_info->ready); | 1233 UpdateAndroidSettingsAppState(app_info->ready); |
| 1235 } | 1234 } |
| 1236 | 1235 |
| (...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2366 | 2365 |
| 2367 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2366 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
| 2368 #if defined(OS_CHROMEOS) | 2367 #if defined(OS_CHROMEOS) |
| 2369 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2368 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
| 2370 #else | 2369 #else |
| 2371 return true; | 2370 return true; |
| 2372 #endif | 2371 #endif |
| 2373 } | 2372 } |
| 2374 | 2373 |
| 2375 } // namespace options | 2374 } // namespace options |
| OLD | NEW |