| 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/settings/device_settings_provider.h" | 5 #include "chrome/browser/chromeos/settings/device_settings_provider.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 account->set_type( | 261 account->set_type( |
| 262 static_cast<em::DeviceLocalAccountInfoProto::AccountType>( | 262 static_cast<em::DeviceLocalAccountInfoProto::AccountType>( |
| 263 type)); | 263 type)); |
| 264 } | 264 } |
| 265 std::string kiosk_app_id; | 265 std::string kiosk_app_id; |
| 266 if (entry_dict->GetStringWithoutPathExpansion( | 266 if (entry_dict->GetStringWithoutPathExpansion( |
| 267 kAccountsPrefDeviceLocalAccountsKeyKioskAppId, | 267 kAccountsPrefDeviceLocalAccountsKeyKioskAppId, |
| 268 &kiosk_app_id)) { | 268 &kiosk_app_id)) { |
| 269 account->mutable_kiosk_app()->set_app_id(kiosk_app_id); | 269 account->mutable_kiosk_app()->set_app_id(kiosk_app_id); |
| 270 } | 270 } |
| 271 std::string kiosk_app_update_url; | |
| 272 if (entry_dict->GetStringWithoutPathExpansion( | |
| 273 kAccountsPrefDeviceLocalAccountsKeyKioskAppUpdateURL, | |
| 274 &kiosk_app_update_url)) { | |
| 275 account->mutable_kiosk_app()->set_update_url(kiosk_app_update_url); | |
| 276 } | |
| 277 } else { | 271 } else { |
| 278 NOTREACHED(); | 272 NOTREACHED(); |
| 279 } | 273 } |
| 280 } | 274 } |
| 281 } else { | 275 } else { |
| 282 NOTREACHED(); | 276 NOTREACHED(); |
| 283 } | 277 } |
| 284 } else if (prop == kAccountsPrefDeviceLocalAccountAutoLoginId) { | 278 } else if (prop == kAccountsPrefDeviceLocalAccountAutoLoginId) { |
| 285 em::DeviceLocalAccountsProto* device_local_accounts = | 279 em::DeviceLocalAccountsProto* device_local_accounts = |
| 286 device_settings_.mutable_device_local_accounts(); | 280 device_settings_.mutable_device_local_accounts(); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 entry_dict->SetStringWithoutPathExpansion( | 507 entry_dict->SetStringWithoutPathExpansion( |
| 514 kAccountsPrefDeviceLocalAccountsKeyId, entry->account_id()); | 508 kAccountsPrefDeviceLocalAccountsKeyId, entry->account_id()); |
| 515 } | 509 } |
| 516 entry_dict->SetIntegerWithoutPathExpansion( | 510 entry_dict->SetIntegerWithoutPathExpansion( |
| 517 kAccountsPrefDeviceLocalAccountsKeyType, entry->type()); | 511 kAccountsPrefDeviceLocalAccountsKeyType, entry->type()); |
| 518 if (entry->kiosk_app().has_app_id()) { | 512 if (entry->kiosk_app().has_app_id()) { |
| 519 entry_dict->SetStringWithoutPathExpansion( | 513 entry_dict->SetStringWithoutPathExpansion( |
| 520 kAccountsPrefDeviceLocalAccountsKeyKioskAppId, | 514 kAccountsPrefDeviceLocalAccountsKeyKioskAppId, |
| 521 entry->kiosk_app().app_id()); | 515 entry->kiosk_app().app_id()); |
| 522 } | 516 } |
| 523 if (entry->kiosk_app().has_update_url()) { | |
| 524 entry_dict->SetStringWithoutPathExpansion( | |
| 525 kAccountsPrefDeviceLocalAccountsKeyKioskAppUpdateURL, | |
| 526 entry->kiosk_app().update_url()); | |
| 527 } | |
| 528 } else if (entry->has_deprecated_public_session_id()) { | 517 } else if (entry->has_deprecated_public_session_id()) { |
| 529 // Deprecated public session specification. | 518 // Deprecated public session specification. |
| 530 entry_dict->SetStringWithoutPathExpansion( | 519 entry_dict->SetStringWithoutPathExpansion( |
| 531 kAccountsPrefDeviceLocalAccountsKeyId, | 520 kAccountsPrefDeviceLocalAccountsKeyId, |
| 532 entry->deprecated_public_session_id()); | 521 entry->deprecated_public_session_id()); |
| 533 entry_dict->SetIntegerWithoutPathExpansion( | 522 entry_dict->SetIntegerWithoutPathExpansion( |
| 534 kAccountsPrefDeviceLocalAccountsKeyType, | 523 kAccountsPrefDeviceLocalAccountsKeyType, |
| 535 policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION); | 524 policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION); |
| 536 } | 525 } |
| 537 account_list->Append(entry_dict.release()); | 526 account_list->Append(entry_dict.release()); |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 void DeviceSettingsProvider::AttemptMigration() { | 1002 void DeviceSettingsProvider::AttemptMigration() { |
| 1014 if (device_settings_service_->HasPrivateOwnerKey()) { | 1003 if (device_settings_service_->HasPrivateOwnerKey()) { |
| 1015 PrefValueMap::const_iterator i; | 1004 PrefValueMap::const_iterator i; |
| 1016 for (i = migration_values_.begin(); i != migration_values_.end(); ++i) | 1005 for (i = migration_values_.begin(); i != migration_values_.end(); ++i) |
| 1017 DoSet(i->first, *i->second); | 1006 DoSet(i->first, *i->second); |
| 1018 migration_values_.Clear(); | 1007 migration_values_.Clear(); |
| 1019 } | 1008 } |
| 1020 } | 1009 } |
| 1021 | 1010 |
| 1022 } // namespace chromeos | 1011 } // namespace chromeos |
| OLD | NEW |