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