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

Unified Diff: components/policy/core/common/config_dir_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: 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/config_dir_policy_loader.cc
diff --git a/components/policy/core/common/config_dir_policy_loader.cc b/components/policy/core/common/config_dir_policy_loader.cc
index 0ddfad09328d3ad96cb26c9038d45e899ea805c8..c9344fd44754680e24162bbb1c1a566af2fd08c4 100644
--- a/components/policy/core/common/config_dir_policy_loader.cc
+++ b/components/policy/core/common/config_dir_policy_loader.cc
@@ -77,8 +77,8 @@ void ConfigDirPolicyLoader::InitOnBackgroundThread() {
callback);
}
-scoped_ptr<PolicyBundle> ConfigDirPolicyLoader::Load() {
- scoped_ptr<PolicyBundle> bundle(new PolicyBundle());
+std::unique_ptr<PolicyBundle> ConfigDirPolicyLoader::Load() {
+ std::unique_ptr<PolicyBundle> bundle(new PolicyBundle());
LoadFromPath(config_dir_.Append(kMandatoryConfigDir),
POLICY_LEVEL_MANDATORY,
bundle.get());
@@ -146,7 +146,7 @@ void ConfigDirPolicyLoader::LoadFromPath(const base::FilePath& path,
deserializer.set_allow_trailing_comma(true);
int error_code = 0;
std::string error_msg;
- scoped_ptr<base::Value> value =
+ std::unique_ptr<base::Value> value =
deserializer.Deserialize(&error_code, &error_msg);
if (!value.get()) {
LOG(WARNING) << "Failed to read configuration file "
@@ -163,7 +163,7 @@ void ConfigDirPolicyLoader::LoadFromPath(const base::FilePath& path,
}
// Detach the "3rdparty" node.
- scoped_ptr<base::Value> third_party;
+ std::unique_ptr<base::Value> third_party;
if (dictionary_value->Remove("3rdparty", &third_party))
Merge3rdPartyPolicy(third_party.get(), level, bundle);

Powered by Google App Engine
This is Rietveld 408576698