| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/policy/cloud/policy_header_service_factory.h" | 5 #include "chrome/browser/policy/cloud/policy_header_service_factory.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 #endif | 102 #endif |
| 103 if (!manager) | 103 if (!manager) |
| 104 return NULL; | 104 return NULL; |
| 105 CloudPolicyStore* user_store = manager->core()->store(); | 105 CloudPolicyStore* user_store = manager->core()->store(); |
| 106 CloudPolicyStore* device_store = NULL; | 106 CloudPolicyStore* device_store = NULL; |
| 107 #if defined(OS_CHROMEOS) | 107 #if defined(OS_CHROMEOS) |
| 108 device_store = connector->GetDeviceCloudPolicyManager()->core()->store(); | 108 device_store = connector->GetDeviceCloudPolicyManager()->core()->store(); |
| 109 #endif | 109 #endif |
| 110 | 110 |
| 111 std::unique_ptr<PolicyHeaderService> service = | 111 std::unique_ptr<PolicyHeaderService> service = |
| 112 base::WrapUnique(new PolicyHeaderService( | 112 base::MakeUnique<PolicyHeaderService>( |
| 113 device_management_service->GetServerUrl(), kPolicyVerificationKeyHash, | 113 device_management_service->GetServerUrl(), kPolicyVerificationKeyHash, |
| 114 user_store, device_store)); | 114 user_store, device_store); |
| 115 return new PolicyHeaderServiceWrapper(std::move(service)); | 115 return new PolicyHeaderServiceWrapper(std::move(service)); |
| 116 } | 116 } |
| 117 | 117 |
| 118 // static | 118 // static |
| 119 PolicyHeaderServiceFactory* PolicyHeaderServiceFactory::GetInstance() { | 119 PolicyHeaderServiceFactory* PolicyHeaderServiceFactory::GetInstance() { |
| 120 return base::Singleton<PolicyHeaderServiceFactory>::get(); | 120 return base::Singleton<PolicyHeaderServiceFactory>::get(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 } // namespace policy | 123 } // namespace policy |
| OLD | NEW |