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

Unified Diff: components/policy/core/browser/browser_policy_connector_base.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/browser/browser_policy_connector_base.h
diff --git a/components/policy/core/browser/browser_policy_connector_base.h b/components/policy/core/browser/browser_policy_connector_base.h
index fd1d8fdf8d69da90bbc2446ecbcec8f0a2706b51..50ef056f28ada010d46c8760d3aeb26739302b6b 100644
--- a/components/policy/core/browser/browser_policy_connector_base.h
+++ b/components/policy/core/browser/browser_policy_connector_base.h
@@ -5,8 +5,9 @@
#ifndef COMPONENTS_POLICY_CORE_BROWSER_BROWSER_POLICY_CONNECTOR_BASE_H_
#define COMPONENTS_POLICY_CORE_BROWSER_BROWSER_POLICY_CONNECTOR_BASE_H_
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "components/policy/core/browser/configuration_policy_handler_list.h"
#include "components/policy/core/common/schema.h"
@@ -75,13 +76,13 @@ class POLICY_EXPORT BrowserPolicyConnectorBase {
// Adds |provider| to the list of |policy_providers_|. Providers should
// be added in decreasing order of priority.
- void AddPolicyProvider(scoped_ptr<ConfigurationPolicyProvider> provider);
+ void AddPolicyProvider(std::unique_ptr<ConfigurationPolicyProvider> provider);
// Same as AddPolicyProvider(), but |provider| becomes the platform provider
// which can be retrieved by GetPlatformProvider(). This can be called at
// most once, and uses the same priority order as AddPolicyProvider().
void SetPlatformPolicyProvider(
- scoped_ptr<ConfigurationPolicyProvider> provider);
+ std::unique_ptr<ConfigurationPolicyProvider> provider);
private:
// Whether InitPolicyProviders() but not Shutdown() has been invoked.
@@ -91,7 +92,7 @@ class POLICY_EXPORT BrowserPolicyConnectorBase {
// may trigger policy updates during shutdown, which will result in
// |handler_list_| being consulted for policy translation.
// Therefore, it's important to destroy |handler_list_| after the providers.
- scoped_ptr<ConfigurationPolicyHandlerList> handler_list_;
+ std::unique_ptr<ConfigurationPolicyHandlerList> handler_list_;
// The Chrome schema. This wraps the structure generated by
// generate_policy_source.py at compile time.
@@ -105,7 +106,7 @@ class POLICY_EXPORT BrowserPolicyConnectorBase {
ConfigurationPolicyProvider* platform_policy_provider_;
// Must be deleted before all the policy providers.
- scoped_ptr<PolicyService> policy_service_;
+ std::unique_ptr<PolicyService> policy_service_;
DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnectorBase);
};

Powered by Google App Engine
This is Rietveld 408576698