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

Unified Diff: components/ownership/owner_settings_service.cc

Issue 1921923002: Convert //components/[o-t]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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: components/ownership/owner_settings_service.cc
diff --git a/components/ownership/owner_settings_service.cc b/components/ownership/owner_settings_service.cc
index 49905941ed898d39c8480e73f3b86b8b040577ee..e760cb5a87d79eae5417a2e2490201d8e899b446 100644
--- a/components/ownership/owner_settings_service.cc
+++ b/components/ownership/owner_settings_service.cc
@@ -25,19 +25,19 @@ namespace ownership {
namespace {
-using ScopedSGNContext =
- scoped_ptr<SGNContext,
- crypto::NSSDestroyer1<SGNContext, SGN_DestroyContext, PR_TRUE>>;
+using ScopedSGNContext = std::unique_ptr<
+ SGNContext,
+ crypto::NSSDestroyer1<SGNContext, SGN_DestroyContext, PR_TRUE>>;
-scoped_ptr<em::PolicyFetchResponse> AssembleAndSignPolicy(
- scoped_ptr<em::PolicyData> policy,
+std::unique_ptr<em::PolicyFetchResponse> AssembleAndSignPolicy(
+ std::unique_ptr<em::PolicyData> policy,
SECKEYPrivateKey* private_key) {
// Assemble the policy.
- scoped_ptr<em::PolicyFetchResponse> policy_response(
+ std::unique_ptr<em::PolicyFetchResponse> policy_response(
new em::PolicyFetchResponse());
if (!policy->SerializeToString(policy_response->mutable_policy_data())) {
LOG(ERROR) << "Failed to encode policy payload.";
- return scoped_ptr<em::PolicyFetchResponse>(nullptr);
+ return nullptr;
}
ScopedSGNContext sign_context(
@@ -102,7 +102,7 @@ void OwnerSettingsService::IsOwnerAsync(const IsOwnerCallback& callback) {
bool OwnerSettingsService::AssembleAndSignPolicyAsync(
base::TaskRunner* task_runner,
- scoped_ptr<em::PolicyData> policy,
+ std::unique_ptr<em::PolicyData> policy,
const AssembleAndSignPolicyAsyncCallback& callback) {
DCHECK(thread_checker_.CalledOnValidThread());
if (!task_runner || !IsOwner())
« no previous file with comments | « components/ownership/owner_settings_service.h ('k') | components/page_load_metrics/browser/metrics_web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698