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/policy/device_local_account_policy_provider.h" | 5 #include "chrome/browser/chromeos/policy/device_local_account_policy_provider.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 key::kLidCloseAction, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, | 64 key::kLidCloseAction, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, |
65 POLICY_SOURCE_PUBLIC_SESSION_OVERRIDE, | 65 POLICY_SOURCE_PUBLIC_SESSION_OVERRIDE, |
66 base::MakeUnique<base::Value>( | 66 base::MakeUnique<base::Value>( |
67 chromeos::PowerPolicyController::ACTION_STOP_SESSION), | 67 chromeos::PowerPolicyController::ACTION_STOP_SESSION), |
68 nullptr); | 68 nullptr); |
69 // Force the |ShelfAutoHideBehavior| policy to |Never|, ensuring that the | 69 // Force the |ShelfAutoHideBehavior| policy to |Never|, ensuring that the |
70 // ash shelf does not auto-hide. | 70 // ash shelf does not auto-hide. |
71 chrome_policy_overrides->Set( | 71 chrome_policy_overrides->Set( |
72 key::kShelfAutoHideBehavior, POLICY_LEVEL_MANDATORY, | 72 key::kShelfAutoHideBehavior, POLICY_LEVEL_MANDATORY, |
73 POLICY_SCOPE_MACHINE, POLICY_SOURCE_PUBLIC_SESSION_OVERRIDE, | 73 POLICY_SCOPE_MACHINE, POLICY_SOURCE_PUBLIC_SESSION_OVERRIDE, |
74 base::MakeUnique<base::StringValue>("Never"), nullptr); | 74 base::MakeUnique<base::Value>("Never"), nullptr); |
75 // Force the |ShowLogoutButtonInTray| policy to |true|, ensuring that a big, | 75 // Force the |ShowLogoutButtonInTray| policy to |true|, ensuring that a big, |
76 // red logout button is shown in the ash system tray. | 76 // red logout button is shown in the ash system tray. |
77 chrome_policy_overrides->Set(key::kShowLogoutButtonInTray, | 77 chrome_policy_overrides->Set(key::kShowLogoutButtonInTray, |
78 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, | 78 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, |
79 POLICY_SOURCE_PUBLIC_SESSION_OVERRIDE, | 79 POLICY_SOURCE_PUBLIC_SESSION_OVERRIDE, |
80 base::MakeUnique<base::Value>(true), nullptr); | 80 base::MakeUnique<base::Value>(true), nullptr); |
81 // Force the |FullscreenAllowed| policy to |false|, ensuring that the ash | 81 // Force the |FullscreenAllowed| policy to |false|, ensuring that the ash |
82 // shelf cannot be hidden by entering fullscreen mode. | 82 // shelf cannot be hidden by entering fullscreen mode. |
83 chrome_policy_overrides->Set(key::kFullscreenAllowed, | 83 chrome_policy_overrides->Set(key::kFullscreenAllowed, |
84 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, | 84 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 const PolicyMap::Entry& entry = policy_override.second; | 175 const PolicyMap::Entry& entry = policy_override.second; |
176 chrome_policy.Set(policy_override.first, entry.level, entry.scope, | 176 chrome_policy.Set(policy_override.first, entry.level, entry.scope, |
177 entry.source, entry.value->CreateDeepCopy(), nullptr); | 177 entry.source, entry.value->CreateDeepCopy(), nullptr); |
178 } | 178 } |
179 } | 179 } |
180 | 180 |
181 UpdatePolicy(std::move(bundle)); | 181 UpdatePolicy(std::move(bundle)); |
182 } | 182 } |
183 | 183 |
184 } // namespace policy | 184 } // namespace policy |
OLD | NEW |