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

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

Issue 499923002: Revert "Set default multi-profile policy to not-allowed." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/user_cloud_policy_manager_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/user_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.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/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 } 273 }
274 274
275 void UserCloudPolicyManagerChromeOS::OnComponentCloudPolicyUpdated() { 275 void UserCloudPolicyManagerChromeOS::OnComponentCloudPolicyUpdated() {
276 CloudPolicyManager::OnComponentCloudPolicyUpdated(); 276 CloudPolicyManager::OnComponentCloudPolicyUpdated();
277 StartRefreshSchedulerIfReady(); 277 StartRefreshSchedulerIfReady();
278 } 278 }
279 279
280 void UserCloudPolicyManagerChromeOS::GetChromePolicy(PolicyMap* policy_map) { 280 void UserCloudPolicyManagerChromeOS::GetChromePolicy(PolicyMap* policy_map) {
281 CloudPolicyManager::GetChromePolicy(policy_map); 281 CloudPolicyManager::GetChromePolicy(policy_map);
282 282
283 // Default multi-profile behavior for managed accounts to not-allowed. 283 // Default multi-profile behavior for managed accounts to primary-only.
284 if (store()->has_policy() && 284 if (store()->has_policy() &&
285 !policy_map->Get(key::kChromeOsMultiProfileUserBehavior)) { 285 !policy_map->Get(key::kChromeOsMultiProfileUserBehavior)) {
286 policy_map->Set(key::kChromeOsMultiProfileUserBehavior, 286 policy_map->Set(key::kChromeOsMultiProfileUserBehavior,
287 POLICY_LEVEL_MANDATORY, 287 POLICY_LEVEL_MANDATORY,
288 POLICY_SCOPE_USER, 288 POLICY_SCOPE_USER,
289 new base::StringValue("not-allowed"), 289 new base::StringValue("primary-only"),
290 NULL); 290 NULL);
291 } 291 }
292 } 292 }
293 293
294 void UserCloudPolicyManagerChromeOS::FetchPolicyOAuthTokenUsingSigninProfile() { 294 void UserCloudPolicyManagerChromeOS::FetchPolicyOAuthTokenUsingSigninProfile() {
295 scoped_refptr<net::URLRequestContextGetter> signin_context; 295 scoped_refptr<net::URLRequestContextGetter> signin_context;
296 Profile* signin_profile = chromeos::ProfileHelper::GetSigninProfile(); 296 Profile* signin_profile = chromeos::ProfileHelper::GetSigninProfile();
297 if (signin_profile) 297 if (signin_profile)
298 signin_context = signin_profile->GetRequestContext(); 298 signin_context = signin_profile->GetRequestContext();
299 if (!signin_context.get()) { 299 if (!signin_context.get()) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 // OnComponentCloudPolicyUpdated() once it's ready. 389 // OnComponentCloudPolicyUpdated() once it's ready.
390 return; 390 return;
391 } 391 }
392 392
393 core()->StartRefreshScheduler(); 393 core()->StartRefreshScheduler();
394 core()->TrackRefreshDelayPref(local_state_, 394 core()->TrackRefreshDelayPref(local_state_,
395 policy_prefs::kUserPolicyRefreshRate); 395 policy_prefs::kUserPolicyRefreshRate);
396 } 396 }
397 397
398 } // namespace policy 398 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698