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

Unified Diff: components/policy/tools/generate_policy_source.py

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
« no previous file with comments | « components/policy/core/common/schema_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/tools/generate_policy_source.py
diff --git a/components/policy/tools/generate_policy_source.py b/components/policy/tools/generate_policy_source.py
index 6f21651d4528dc4c8440f1bcc46d9b17f8f2f91e..74a237b71df4c564a76d9d9310f8581167fb07c3 100755
--- a/components/policy/tools/generate_policy_source.py
+++ b/components/policy/tools/generate_policy_source.py
@@ -1002,12 +1002,12 @@ def _WriteCloudPolicyProtobuf(policies, os, f, riskTags):
CPP_HEAD = '''
#include <limits>
+#include <memory>
#include <string>
#include "base/callback.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/values.h"
#include "components/policy/core/common/cloud/cloud_external_data_manager.h"
@@ -1045,7 +1045,7 @@ base::ListValue* DecodeStringList(const em::StringList& string_list) {
}
base::Value* DecodeJson(const std::string& json) {
- scoped_ptr<base::Value> root =
+ std::unique_ptr<base::Value> root =
base::JSONReader::Read(json, base::JSON_ALLOW_TRAILING_COMMAS);
if (!root)
« no previous file with comments | « components/policy/core/common/schema_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698