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.h

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 side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/async_policy_loader.h
diff --git a/components/policy/core/common/async_policy_loader.h b/components/policy/core/common/async_policy_loader.h
index 4f5352cbc94f1af8f730bbffa91d8b2e8ce4530a..b15578cfb67ee0d18897240ab734947bac488060 100644
--- a/components/policy/core/common/async_policy_loader.h
+++ b/components/policy/core/common/async_policy_loader.h
@@ -5,10 +5,11 @@
#ifndef COMPONENTS_POLICY_CORE_COMMON_ASYNC_POLICY_LOADER_H_
#define COMPONENTS_POLICY_CORE_COMMON_ASYNC_POLICY_LOADER_H_
+#include <memory>
+
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "components/policy/core/common/schema_map.h"
@@ -44,7 +45,7 @@ class POLICY_EXPORT AsyncPolicyLoader {
// Returns the currently configured policies. Load() is always invoked on
// the background thread, except for the initial Load() at startup which is
// invoked from the thread that owns the provider.
- virtual scoped_ptr<PolicyBundle> Load() = 0;
+ virtual std::unique_ptr<PolicyBundle> Load() = 0;
// Allows implementations to finalize their initialization on the background
// thread (e.g. setup file watchers).
@@ -57,7 +58,8 @@ class POLICY_EXPORT AsyncPolicyLoader {
// Used by the AsyncPolicyProvider to do the initial Load(). The first load
// is also used to initialize |last_modification_time_| and
// |schema_map_|.
- scoped_ptr<PolicyBundle> InitialLoad(const scoped_refptr<SchemaMap>& schemas);
+ std::unique_ptr<PolicyBundle> InitialLoad(
+ const scoped_refptr<SchemaMap>& schemas);
// Implementations should invoke Reload() when a change is detected. This
// must be invoked from the background thread and will trigger a Load(),
@@ -76,7 +78,7 @@ class POLICY_EXPORT AsyncPolicyLoader {
// Allow AsyncPolicyProvider to call Init().
friend class AsyncPolicyProvider;
- typedef base::Callback<void(scoped_ptr<PolicyBundle>)> UpdateCallback;
+ typedef base::Callback<void(std::unique_ptr<PolicyBundle>)> UpdateCallback;
// Used by the AsyncPolicyProvider to install the |update_callback_|.
// Invoked on the background thread.

Powered by Google App Engine
This is Rietveld 408576698