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

Side by Side Diff: chrome/browser/chromeos/policy/device_local_account.cc

Issue 907323002: Implemented DeviceStatusCollector::GetDeviceSessionStatus() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/policy/device_local_account.h" 5 #include "chrome/browser/chromeos/policy/device_local_account.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 20 matching lines...) Expand all
31 const std::string& account_id, 31 const std::string& account_id,
32 const std::string& kiosk_app_id, 32 const std::string& kiosk_app_id,
33 const std::string& kiosk_app_update_url) 33 const std::string& kiosk_app_update_url)
34 : type(type), 34 : type(type),
35 account_id(account_id), 35 account_id(account_id),
36 user_id(GenerateDeviceLocalAccountUserId(account_id, type)), 36 user_id(GenerateDeviceLocalAccountUserId(account_id, type)),
37 kiosk_app_id(kiosk_app_id), 37 kiosk_app_id(kiosk_app_id),
38 kiosk_app_update_url(kiosk_app_update_url) { 38 kiosk_app_update_url(kiosk_app_update_url) {
39 } 39 }
40 40
41 DeviceLocalAccount::DeviceLocalAccount(Type type)
42 : type(type) {
43 }
44
41 DeviceLocalAccount::~DeviceLocalAccount() { 45 DeviceLocalAccount::~DeviceLocalAccount() {
42 } 46 }
43 47
44 std::string GenerateDeviceLocalAccountUserId(const std::string& account_id, 48 std::string GenerateDeviceLocalAccountUserId(const std::string& account_id,
45 DeviceLocalAccount::Type type) { 49 DeviceLocalAccount::Type type) {
46 std::string domain_prefix; 50 std::string domain_prefix;
47 switch (type) { 51 switch (type) {
48 case DeviceLocalAccount::TYPE_PUBLIC_SESSION: 52 case DeviceLocalAccount::TYPE_PUBLIC_SESSION:
49 domain_prefix = kPublicAccountDomainPrefix; 53 domain_prefix = kPublicAccountDomainPrefix;
50 break; 54 break;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 accounts.push_back( 184 accounts.push_back(
181 DeviceLocalAccount(static_cast<DeviceLocalAccount::Type>(type), 185 DeviceLocalAccount(static_cast<DeviceLocalAccount::Type>(type),
182 account_id, 186 account_id,
183 kiosk_app_id, 187 kiosk_app_id,
184 kiosk_app_update_url)); 188 kiosk_app_update_url));
185 } 189 }
186 return accounts; 190 return accounts;
187 } 191 }
188 192
189 } // namespace policy 193 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698