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

Unified Diff: components/policy/core/common/async_policy_loader.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: 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/policy/core/common/async_policy_loader.cc
diff --git a/components/policy/core/common/async_policy_loader.cc b/components/policy/core/common/async_policy_loader.cc
index 1c974fa502932fe00b1a24f088ddcd4b3ef2d300..c99526a5bf17a8d795f1c59800066dc5295424b7 100644
--- a/components/policy/core/common/async_policy_loader.cc
+++ b/components/policy/core/common/async_policy_loader.cc
@@ -51,7 +51,7 @@ void AsyncPolicyLoader::Reload(bool force) {
return;
}
- scoped_ptr<PolicyBundle> bundle(Load());
+ std::unique_ptr<PolicyBundle> bundle(Load());
// Check if there was a modification while reading.
if (!force && !IsSafeToReload(now, &delay)) {
@@ -66,14 +66,14 @@ void AsyncPolicyLoader::Reload(bool force) {
ScheduleNextReload(TimeDelta::FromSeconds(kReloadIntervalSeconds));
}
-scoped_ptr<PolicyBundle> AsyncPolicyLoader::InitialLoad(
+std::unique_ptr<PolicyBundle> AsyncPolicyLoader::InitialLoad(
const scoped_refptr<SchemaMap>& schema_map) {
// This is the first load, early during startup. Use this to record the
// initial |last_modification_time_|, so that potential changes made before
// installing the watches can be detected.
last_modification_time_ = LastModificationTime();
schema_map_ = schema_map;
- scoped_ptr<PolicyBundle> bundle(Load());
+ std::unique_ptr<PolicyBundle> bundle(Load());
// Filter out mismatching policies.
schema_map_->FilterBundle(bundle.get());
return bundle;

Powered by Google App Engine
This is Rietveld 408576698