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

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

Issue 22986010: Add policy for fullscreen mode; disallow fullscreen in public sessions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add an explanation of fullscreen mode. Created 7 years, 4 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 | Annotate | Revision Log
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/device_local_account_policy_store.h" 5 #include "chrome/browser/chromeos/policy/device_local_account_policy_store.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/policy/cloud/device_management_service.h" 10 #include "chrome/browser/policy/cloud/device_management_service.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 POLICY_SCOPE_USER, 94 POLICY_SCOPE_USER,
95 Value::CreateStringValue("Never"), 95 Value::CreateStringValue("Never"),
96 NULL); 96 NULL);
97 // Force the |ShowLogoutButtonInTray| policy to |true|, ensuring that a big, 97 // Force the |ShowLogoutButtonInTray| policy to |true|, ensuring that a big,
98 // red logout button is shown in the ash system tray. 98 // red logout button is shown in the ash system tray.
99 policy_map_.Set(key::kShowLogoutButtonInTray, 99 policy_map_.Set(key::kShowLogoutButtonInTray,
100 POLICY_LEVEL_MANDATORY, 100 POLICY_LEVEL_MANDATORY,
101 POLICY_SCOPE_USER, 101 POLICY_SCOPE_USER,
102 Value::CreateBooleanValue(true), 102 Value::CreateBooleanValue(true),
103 NULL); 103 NULL);
104 // Force the |FullscreenAllowed| policy to |false|, ensuring that the ash
105 // shelf cannot be hidden by entering fullscreen mode.
106 policy_map_.Set(key::kFullscreenAllowed,
107 POLICY_LEVEL_MANDATORY,
108 POLICY_SCOPE_USER,
109 Value::CreateBooleanValue(false),
110 NULL);
104 // Restrict device-local accounts to hosted apps for now (i.e. no extensions, 111 // Restrict device-local accounts to hosted apps for now (i.e. no extensions,
105 // packaged apps etc.) for security/privacy reasons (i.e. we'd like to 112 // packaged apps etc.) for security/privacy reasons (i.e. we'd like to
106 // prevent the admin from stealing private information from random people). 113 // prevent the admin from stealing private information from random people).
107 scoped_ptr<base::ListValue> allowed_extension_types(new base::ListValue()); 114 scoped_ptr<base::ListValue> allowed_extension_types(new base::ListValue());
108 allowed_extension_types->AppendString("hosted_app"); 115 allowed_extension_types->AppendString("hosted_app");
109 policy_map_.Set(key::kExtensionAllowedTypes, 116 policy_map_.Set(key::kExtensionAllowedTypes,
110 POLICY_LEVEL_MANDATORY, 117 POLICY_LEVEL_MANDATORY,
111 POLICY_SCOPE_USER, 118 POLICY_SCOPE_USER,
112 allowed_extension_types.release(), 119 allowed_extension_types.release(),
113 NULL); 120 NULL);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 validator->ValidateAgainstCurrentPolicy( 187 validator->ValidateAgainstCurrentPolicy(
181 policy(), 188 policy(),
182 CloudPolicyValidatorBase::TIMESTAMP_REQUIRED, 189 CloudPolicyValidatorBase::TIMESTAMP_REQUIRED,
183 CloudPolicyValidatorBase::DM_TOKEN_REQUIRED); 190 CloudPolicyValidatorBase::DM_TOKEN_REQUIRED);
184 validator->ValidatePayload(); 191 validator->ValidatePayload();
185 validator->ValidateSignature(*key->public_key(), false); 192 validator->ValidateSignature(*key->public_key(), false);
186 validator.release()->StartValidation(callback); 193 validator.release()->StartValidation(callback);
187 } 194 }
188 195
189 } // namespace policy 196 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698