| 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/chromeos/extensions/info_private_api.h" | 5 #include "chrome/browser/chromeos/extensions/info_private_api.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/sys_info.h" | 11 #include "base/sys_info.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/browser/app_mode/app_mode_utils.h" | 13 #include "chrome/browser/app_mode/app_mode_utils.h" |
| 14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
| 15 #include "chrome/browser/chromeos/arc/arc_session_manager.h" | 15 #include "chrome/browser/chromeos/arc/arc_util.h" |
| 16 #include "chrome/browser/chromeos/login/startup_utils.h" | 16 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 17 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 17 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 18 #include "chrome/browser/chromeos/settings/cros_settings.h" | 18 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 19 #include "chrome/browser/chromeos/system/timezone_util.h" | 19 #include "chrome/browser/chromeos/system/timezone_util.h" |
| 20 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
| 21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
| 22 #include "chromeos/network/device_state.h" | 22 #include "chromeos/network/device_state.h" |
| 23 #include "chromeos/network/network_handler.h" | 23 #include "chromeos/network/network_handler.h" |
| 24 #include "chromeos/network/network_state_handler.h" | 24 #include "chromeos/network/network_state_handler.h" |
| 25 #include "chromeos/settings/cros_settings_names.h" | 25 #include "chromeos/settings/cros_settings_names.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 254 |
| 255 if (property_name == kPropertySessionType) { | 255 if (property_name == kPropertySessionType) { |
| 256 if (ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode()) | 256 if (ExtensionsBrowserClient::Get()->IsRunningInForcedAppMode()) |
| 257 return new base::StringValue(kSessionTypeKiosk); | 257 return new base::StringValue(kSessionTypeKiosk); |
| 258 if (ExtensionsBrowserClient::Get()->IsLoggedInAsPublicAccount()) | 258 if (ExtensionsBrowserClient::Get()->IsLoggedInAsPublicAccount()) |
| 259 return new base::StringValue(kSessionTypePublicSession); | 259 return new base::StringValue(kSessionTypePublicSession); |
| 260 return new base::StringValue(kSessionTypeNormal); | 260 return new base::StringValue(kSessionTypeNormal); |
| 261 } | 261 } |
| 262 | 262 |
| 263 if (property_name == kPropertyPlayStoreStatus) { | 263 if (property_name == kPropertyPlayStoreStatus) { |
| 264 if (arc::ArcSessionManager::IsAllowedForProfile( | 264 if (arc::IsArcAllowedForProfile(Profile::FromBrowserContext(context_))) |
| 265 Profile::FromBrowserContext(context_))) { | |
| 266 return new base::StringValue(kPlayStoreStatusEnabled); | 265 return new base::StringValue(kPlayStoreStatusEnabled); |
| 267 } | |
| 268 if (arc::IsArcAvailable()) | 266 if (arc::IsArcAvailable()) |
| 269 return new base::StringValue(kPlayStoreStatusAvailable); | 267 return new base::StringValue(kPlayStoreStatusAvailable); |
| 270 return new base::StringValue(kPlayStoreStatusNotAvailable); | 268 return new base::StringValue(kPlayStoreStatusNotAvailable); |
| 271 } | 269 } |
| 272 | 270 |
| 273 if (property_name == kPropertyClientId) { | 271 if (property_name == kPropertyClientId) { |
| 274 return new base::StringValue(GetClientId()); | 272 return new base::StringValue(GetClientId()); |
| 275 } | 273 } |
| 276 | 274 |
| 277 if (property_name == kPropertyTimezone) { | 275 if (property_name == kPropertyTimezone) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 param_value); | 318 param_value); |
| 321 } else { | 319 } else { |
| 322 return RespondNow(Error(kPropertyNotFound, param_name)); | 320 return RespondNow(Error(kPropertyNotFound, param_name)); |
| 323 } | 321 } |
| 324 } | 322 } |
| 325 | 323 |
| 326 return RespondNow(NoArguments()); | 324 return RespondNow(NoArguments()); |
| 327 } | 325 } |
| 328 | 326 |
| 329 } // namespace extensions | 327 } // namespace extensions |
| OLD | NEW |