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

Unified Diff: components/policy/core/common/mock_configuration_policy_provider.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: 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/mock_configuration_policy_provider.cc
diff --git a/components/policy/core/common/mock_configuration_policy_provider.cc b/components/policy/core/common/mock_configuration_policy_provider.cc
index c150321cd09e560815fa104d671f3bb6908a4e90..ed76aef745b4e098594fbe6b9d97e8820dfb35ca 100644
--- a/components/policy/core/common/mock_configuration_policy_provider.cc
+++ b/components/policy/core/common/mock_configuration_policy_provider.cc
@@ -4,10 +4,10 @@
#include "components/policy/core/common/mock_configuration_policy_provider.h"
+#include <memory>
#include <string>
#include <utility>
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "components/policy/core/common/policy_bundle.h"
@@ -22,7 +22,7 @@ MockConfigurationPolicyProvider::~MockConfigurationPolicyProvider() {}
void MockConfigurationPolicyProvider::UpdateChromePolicy(
const PolicyMap& policy) {
- scoped_ptr<PolicyBundle> bundle(new PolicyBundle());
+ std::unique_ptr<PolicyBundle> bundle(new PolicyBundle());
bundle->Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
.CopyFrom(policy);
UpdatePolicy(std::move(bundle));
@@ -36,7 +36,7 @@ void MockConfigurationPolicyProvider::SetAutoRefresh() {
}
void MockConfigurationPolicyProvider::RefreshWithSamePolicies() {
- scoped_ptr<PolicyBundle> bundle(new PolicyBundle);
+ std::unique_ptr<PolicyBundle> bundle(new PolicyBundle);
bundle->CopyFrom(policies());
UpdatePolicy(std::move(bundle));
}
« no previous file with comments | « components/policy/core/common/mac_util_unittest.cc ('k') | components/policy/core/common/policy_bundle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698