Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(457)

Side by Side Diff: chrome/browser/chromeos/extensions/info_private_api.cc

Issue 2668153002: Revert of Move more utility functions to arc_util. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_util.h" 15 #include "chrome/browser/chromeos/arc/arc_session_manager.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
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::IsArcAllowedForProfile(Profile::FromBrowserContext(context_))) 264 if (arc::ArcSessionManager::IsAllowedForProfile(
265 Profile::FromBrowserContext(context_))) {
265 return new base::StringValue(kPlayStoreStatusEnabled); 266 return new base::StringValue(kPlayStoreStatusEnabled);
267 }
266 if (arc::IsArcAvailable()) 268 if (arc::IsArcAvailable())
267 return new base::StringValue(kPlayStoreStatusAvailable); 269 return new base::StringValue(kPlayStoreStatusAvailable);
268 return new base::StringValue(kPlayStoreStatusNotAvailable); 270 return new base::StringValue(kPlayStoreStatusNotAvailable);
269 } 271 }
270 272
271 if (property_name == kPropertyClientId) { 273 if (property_name == kPropertyClientId) {
272 return new base::StringValue(GetClientId()); 274 return new base::StringValue(GetClientId());
273 } 275 }
274 276
275 if (property_name == kPropertyTimezone) { 277 if (property_name == kPropertyTimezone) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 param_value); 320 param_value);
319 } else { 321 } else {
320 return RespondNow(Error(kPropertyNotFound, param_name)); 322 return RespondNow(Error(kPropertyNotFound, param_name));
321 } 323 }
322 } 324 }
323 325
324 return RespondNow(NoArguments()); 326 return RespondNow(NoArguments());
325 } 327 }
326 328
327 } // namespace extensions 329 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698