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

Side by Side Diff: components/policy/core/browser/browser_policy_connector.cc

Issue 1902633006: Convert //components/policy from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and use namespace alias Created 4 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/policy/core/browser/browser_policy_connector.h" 5 #include "components/policy/core/browser/browser_policy_connector.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 BrowserPolicyConnector::BrowserPolicyConnector( 92 BrowserPolicyConnector::BrowserPolicyConnector(
93 const HandlerListFactory& handler_list_factory) 93 const HandlerListFactory& handler_list_factory)
94 : BrowserPolicyConnectorBase(handler_list_factory) { 94 : BrowserPolicyConnectorBase(handler_list_factory) {
95 } 95 }
96 96
97 BrowserPolicyConnector::~BrowserPolicyConnector() { 97 BrowserPolicyConnector::~BrowserPolicyConnector() {
98 } 98 }
99 99
100 void BrowserPolicyConnector::InitInternal( 100 void BrowserPolicyConnector::InitInternal(
101 PrefService* local_state, 101 PrefService* local_state,
102 scoped_ptr<DeviceManagementService> device_management_service) { 102 std::unique_ptr<DeviceManagementService> device_management_service) {
103 DCHECK(!is_initialized()); 103 DCHECK(!is_initialized());
104 104
105 device_management_service_ = std::move(device_management_service); 105 device_management_service_ = std::move(device_management_service);
106 106
107 policy_statistics_collector_.reset(new policy::PolicyStatisticsCollector( 107 policy_statistics_collector_.reset(new policy::PolicyStatisticsCollector(
108 base::Bind(&GetChromePolicyDetails), GetChromeSchema(), 108 base::Bind(&GetChromePolicyDetails), GetChromeSchema(),
109 GetPolicyService(), local_state, 109 GetPolicyService(), local_state,
110 base::MessageLoop::current()->task_runner())); 110 base::MessageLoop::current()->task_runner()));
111 policy_statistics_collector_->Initialize(); 111 policy_statistics_collector_->Initialize();
112 112
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 // static 157 // static
158 void BrowserPolicyConnector::RegisterPrefs(PrefRegistrySimple* registry) { 158 void BrowserPolicyConnector::RegisterPrefs(PrefRegistrySimple* registry) {
159 registry->RegisterIntegerPref( 159 registry->RegisterIntegerPref(
160 policy_prefs::kUserPolicyRefreshRate, 160 policy_prefs::kUserPolicyRefreshRate,
161 CloudPolicyRefreshScheduler::kDefaultRefreshDelayMs); 161 CloudPolicyRefreshScheduler::kDefaultRefreshDelayMs);
162 } 162 }
163 163
164 164
165 } // namespace policy 165 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698