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

Unified Diff: chrome/browser/chromeos/policy/policy_cert_service.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/policy_cert_service.cc
diff --git a/chrome/browser/chromeos/policy/policy_cert_service.cc b/chrome/browser/chromeos/policy/policy_cert_service.cc
index ed503b5b4c39b1e76ea08d337b2885da292ff456..2d77e53efa58715818e8d09a2710d3928169773d 100644
--- a/chrome/browser/chromeos/policy/policy_cert_service.cc
+++ b/chrome/browser/chromeos/policy/policy_cert_service.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
#include "chrome/browser/chromeos/policy/policy_cert_verifier.h"
#include "components/user_manager/user_manager.h"
@@ -45,7 +46,8 @@ PolicyCertService::PolicyCertService(const std::string& user_id,
weak_ptr_factory_(this) {
}
-scoped_ptr<PolicyCertVerifier> PolicyCertService::CreatePolicyCertVerifier() {
+std::unique_ptr<PolicyCertVerifier>
+PolicyCertService::CreatePolicyCertVerifier() {
base::Closure callback = base::Bind(
&PolicyCertServiceFactory::SetUsedPolicyCertificates, user_id_);
cert_verifier_ = new PolicyCertVerifier(
@@ -62,7 +64,7 @@ scoped_ptr<PolicyCertVerifier> PolicyCertService::CreatePolicyCertVerifier() {
net_conf_updater_->GetWebTrustedCertificates(&trust_anchors);
OnTrustAnchorsChanged(trust_anchors);
- return make_scoped_ptr(cert_verifier_);
+ return base::WrapUnique(cert_verifier_);
}
void PolicyCertService::OnTrustAnchorsChanged(
@@ -107,11 +109,11 @@ void PolicyCertService::Shutdown() {
}
// static
-scoped_ptr<PolicyCertService> PolicyCertService::CreateForTesting(
+std::unique_ptr<PolicyCertService> PolicyCertService::CreateForTesting(
const std::string& user_id,
PolicyCertVerifier* verifier,
user_manager::UserManager* user_manager) {
- return make_scoped_ptr(
+ return base::WrapUnique(
new PolicyCertService(user_id, verifier, user_manager));
}
« no previous file with comments | « chrome/browser/chromeos/policy/policy_cert_service.h ('k') | chrome/browser/chromeos/policy/policy_cert_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698