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

Side by Side Diff: chrome/browser/chromeos/settings/device_settings_provider.cc

Issue 676913002: kiosk: Support update url for enterprise. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/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/logging.h" 10 #include "base/logging.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 entry_dict->SetStringWithoutPathExpansion( 173 entry_dict->SetStringWithoutPathExpansion(
174 kAccountsPrefDeviceLocalAccountsKeyId, entry->account_id()); 174 kAccountsPrefDeviceLocalAccountsKeyId, entry->account_id());
175 } 175 }
176 entry_dict->SetIntegerWithoutPathExpansion( 176 entry_dict->SetIntegerWithoutPathExpansion(
177 kAccountsPrefDeviceLocalAccountsKeyType, entry->type()); 177 kAccountsPrefDeviceLocalAccountsKeyType, entry->type());
178 if (entry->kiosk_app().has_app_id()) { 178 if (entry->kiosk_app().has_app_id()) {
179 entry_dict->SetStringWithoutPathExpansion( 179 entry_dict->SetStringWithoutPathExpansion(
180 kAccountsPrefDeviceLocalAccountsKeyKioskAppId, 180 kAccountsPrefDeviceLocalAccountsKeyKioskAppId,
181 entry->kiosk_app().app_id()); 181 entry->kiosk_app().app_id());
182 } 182 }
183 if (entry->kiosk_app().has_update_url()) {
184 entry_dict->SetStringWithoutPathExpansion(
185 kAccountsPrefDeviceLocalAccountsKeyKioskAppUpdateURL,
186 entry->kiosk_app().update_url());
187 }
183 } else if (entry->has_deprecated_public_session_id()) { 188 } else if (entry->has_deprecated_public_session_id()) {
184 // Deprecated public session specification. 189 // Deprecated public session specification.
185 entry_dict->SetStringWithoutPathExpansion( 190 entry_dict->SetStringWithoutPathExpansion(
186 kAccountsPrefDeviceLocalAccountsKeyId, 191 kAccountsPrefDeviceLocalAccountsKeyId,
187 entry->deprecated_public_session_id()); 192 entry->deprecated_public_session_id());
188 entry_dict->SetIntegerWithoutPathExpansion( 193 entry_dict->SetIntegerWithoutPathExpansion(
189 kAccountsPrefDeviceLocalAccountsKeyType, 194 kAccountsPrefDeviceLocalAccountsKeyType,
190 policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION); 195 policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION);
191 } 196 }
192 account_list->Append(entry_dict.release()); 197 account_list->Append(entry_dict.release());
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 account->set_type( 606 account->set_type(
602 static_cast<em::DeviceLocalAccountInfoProto::AccountType>( 607 static_cast<em::DeviceLocalAccountInfoProto::AccountType>(
603 type)); 608 type));
604 } 609 }
605 std::string kiosk_app_id; 610 std::string kiosk_app_id;
606 if (entry_dict->GetStringWithoutPathExpansion( 611 if (entry_dict->GetStringWithoutPathExpansion(
607 kAccountsPrefDeviceLocalAccountsKeyKioskAppId, 612 kAccountsPrefDeviceLocalAccountsKeyKioskAppId,
608 &kiosk_app_id)) { 613 &kiosk_app_id)) {
609 account->mutable_kiosk_app()->set_app_id(kiosk_app_id); 614 account->mutable_kiosk_app()->set_app_id(kiosk_app_id);
610 } 615 }
616 std::string kiosk_app_update_url;
617 if (entry_dict->GetStringWithoutPathExpansion(
618 kAccountsPrefDeviceLocalAccountsKeyKioskAppUpdateURL,
619 &kiosk_app_update_url)) {
620 account->mutable_kiosk_app()->set_update_url(kiosk_app_update_url);
621 }
611 } else { 622 } else {
612 NOTREACHED(); 623 NOTREACHED();
613 } 624 }
614 } 625 }
615 } else { 626 } else {
616 NOTREACHED(); 627 NOTREACHED();
617 } 628 }
618 } else if (prop == kAccountsPrefDeviceLocalAccountAutoLoginId) { 629 } else if (prop == kAccountsPrefDeviceLocalAccountAutoLoginId) {
619 em::DeviceLocalAccountsProto* device_local_accounts = 630 em::DeviceLocalAccountsProto* device_local_accounts =
620 device_settings_.mutable_device_local_accounts(); 631 device_settings_.mutable_device_local_accounts();
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 void DeviceSettingsProvider::AttemptMigration() { 1020 void DeviceSettingsProvider::AttemptMigration() {
1010 if (device_settings_service_->HasPrivateOwnerKey()) { 1021 if (device_settings_service_->HasPrivateOwnerKey()) {
1011 PrefValueMap::const_iterator i; 1022 PrefValueMap::const_iterator i;
1012 for (i = migration_values_.begin(); i != migration_values_.end(); ++i) 1023 for (i = migration_values_.begin(); i != migration_values_.end(); ++i)
1013 DoSet(i->first, *i->second); 1024 DoSet(i->first, *i->second);
1014 migration_values_.Clear(); 1025 migration_values_.Clear();
1015 } 1026 }
1016 } 1027 }
1017 1028
1018 } // namespace chromeos 1029 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698