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/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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
282 | 282 |
283 // Default multi-profile behavior for managed accounts to primary-only. | 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("primary-only"), | 289 new base::StringValue("primary-only"), |
290 NULL); | 290 NULL); |
291 } | 291 } |
292 | |
293 // Default EasyUnlockAllowed is false for managed accounts. | |
Andrew T Wilson (Slow)
2014/08/18 13:37:33
nit: Change comment to 'Set EasyUnlockAllowed poli
xiyuan
2014/08/18 16:38:28
Done.
| |
294 if (store()->has_policy() && | |
295 !policy_map->Get(key::kEasyUnlockAllowed)) { | |
296 policy_map->Set(key::kEasyUnlockAllowed, | |
297 POLICY_LEVEL_MANDATORY, | |
298 POLICY_SCOPE_USER, | |
299 new base::FundamentalValue(false), | |
300 NULL); | |
301 } | |
292 } | 302 } |
293 | 303 |
294 void UserCloudPolicyManagerChromeOS::FetchPolicyOAuthTokenUsingSigninProfile() { | 304 void UserCloudPolicyManagerChromeOS::FetchPolicyOAuthTokenUsingSigninProfile() { |
295 scoped_refptr<net::URLRequestContextGetter> signin_context; | 305 scoped_refptr<net::URLRequestContextGetter> signin_context; |
296 Profile* signin_profile = chromeos::ProfileHelper::GetSigninProfile(); | 306 Profile* signin_profile = chromeos::ProfileHelper::GetSigninProfile(); |
297 if (signin_profile) | 307 if (signin_profile) |
298 signin_context = signin_profile->GetRequestContext(); | 308 signin_context = signin_profile->GetRequestContext(); |
299 if (!signin_context.get()) { | 309 if (!signin_context.get()) { |
300 LOG(ERROR) << "No signin Profile for policy oauth token fetch!"; | 310 LOG(ERROR) << "No signin Profile for policy oauth token fetch!"; |
301 OnOAuth2PolicyTokenFetched( | 311 OnOAuth2PolicyTokenFetched( |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
389 // OnComponentCloudPolicyUpdated() once it's ready. | 399 // OnComponentCloudPolicyUpdated() once it's ready. |
390 return; | 400 return; |
391 } | 401 } |
392 | 402 |
393 core()->StartRefreshScheduler(); | 403 core()->StartRefreshScheduler(); |
394 core()->TrackRefreshDelayPref(local_state_, | 404 core()->TrackRefreshDelayPref(local_state_, |
395 policy_prefs::kUserPolicyRefreshRate); | 405 policy_prefs::kUserPolicyRefreshRate); |
396 } | 406 } |
397 | 407 |
398 } // namespace policy | 408 } // namespace policy |
OLD | NEW |