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

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

Issue 2055553004: arc: Support pinned apps across Arc-enabled and Arc-disabled platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chrome_mash_shelf_controller.cc update due namespace renaming Created 4 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/configuration_policy_handler_chromeos_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/policy/configuration_policy_handler_chromeos.h " 5 #include "chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h "
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 PolicyErrorMap errors; 322 PolicyErrorMap errors;
323 const base::Value* policy_value = policies.GetValue(policy_name()); 323 const base::Value* policy_value = policies.GetValue(policy_name());
324 const base::ListValue* policy_list = NULL; 324 const base::ListValue* policy_list = NULL;
325 if (policy_value && policy_value->GetAsList(&policy_list) && policy_list) { 325 if (policy_value && policy_value->GetAsList(&policy_list) && policy_list) {
326 std::unique_ptr<base::ListValue> pinned_apps_list(new base::ListValue()); 326 std::unique_ptr<base::ListValue> pinned_apps_list(new base::ListValue());
327 for (base::ListValue::const_iterator entry(policy_list->begin()); 327 for (base::ListValue::const_iterator entry(policy_list->begin());
328 entry != policy_list->end(); ++entry) { 328 entry != policy_list->end(); ++entry) {
329 std::string id; 329 std::string id;
330 if ((*entry)->GetAsString(&id)) { 330 if ((*entry)->GetAsString(&id)) {
331 base::DictionaryValue* app_dict = new base::DictionaryValue(); 331 base::DictionaryValue* app_dict = new base::DictionaryValue();
332 app_dict->SetString(ash::kPinnedAppsPrefAppIDPath, id); 332 app_dict->SetString(ash::launcher::kPinnedAppsPrefAppIDPath, id);
333 pinned_apps_list->Append(app_dict); 333 pinned_apps_list->Append(app_dict);
334 } 334 }
335 } 335 }
336 prefs->SetValue(pref_path(), std::move(pinned_apps_list)); 336 prefs->SetValue(pref_path(), std::move(pinned_apps_list));
337 } 337 }
338 } 338 }
339 339
340 ScreenMagnifierPolicyHandler::ScreenMagnifierPolicyHandler() 340 ScreenMagnifierPolicyHandler::ScreenMagnifierPolicyHandler()
341 : IntRangePolicyHandlerBase(key::kScreenMagnifierType, 341 : IntRangePolicyHandlerBase(key::kScreenMagnifierType,
342 0, ui::MAGNIFIER_FULL, false) { 342 0, ui::MAGNIFIER_FULL, false) {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 478
479 value = GetValue(dict, kScreenLockDelayAC); 479 value = GetValue(dict, kScreenLockDelayAC);
480 if (value) 480 if (value)
481 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, std::move(value)); 481 prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, std::move(value));
482 value = GetValue(dict, kScreenLockDelayBattery); 482 value = GetValue(dict, kScreenLockDelayBattery);
483 if (value) 483 if (value)
484 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, std::move(value)); 484 prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, std::move(value));
485 } 485 }
486 486
487 } // namespace policy 487 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/configuration_policy_handler_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698