| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/arc/arc_policy_bridge.h" | 5 #include "chrome/browser/chromeos/arc/arc_policy_bridge.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 VLOG(1) << "ArcPolicyBridge::OnPolicyUpdated"; | 299 VLOG(1) << "ArcPolicyBridge::OnPolicyUpdated"; |
| 300 DCHECK(arc_bridge_service()->policy()->instance()); | 300 DCHECK(arc_bridge_service()->policy()->instance()); |
| 301 arc_bridge_service()->policy()->instance()->OnPolicyUpdated(); | 301 arc_bridge_service()->policy()->instance()->OnPolicyUpdated(); |
| 302 } | 302 } |
| 303 | 303 |
| 304 void ArcPolicyBridge::InitializePolicyService() { | 304 void ArcPolicyBridge::InitializePolicyService() { |
| 305 const user_manager::User* const primary_user = | 305 const user_manager::User* const primary_user = |
| 306 user_manager::UserManager::Get()->GetPrimaryUser(); | 306 user_manager::UserManager::Get()->GetPrimaryUser(); |
| 307 Profile* const profile = | 307 Profile* const profile = |
| 308 chromeos::ProfileHelper::Get()->GetProfileByUser(primary_user); | 308 chromeos::ProfileHelper::Get()->GetProfileByUser(primary_user); |
| 309 auto profile_policy_connector = | 309 auto* profile_policy_connector = |
| 310 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile); | 310 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile); |
| 311 policy_service_ = profile_policy_connector->policy_service(); | 311 policy_service_ = profile_policy_connector->policy_service(); |
| 312 is_managed_ = profile_policy_connector->IsManaged(); | 312 is_managed_ = profile_policy_connector->IsManaged(); |
| 313 } | 313 } |
| 314 | 314 |
| 315 } // namespace arc | 315 } // namespace arc |
| OLD | NEW |