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

Unified Diff: tools/gn/setup.cc

Issue 1869503004: Convert //tools to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, change iwyu fixes for converted directories to include <memory> 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 | « tools/gn/setup.h ('k') | tools/gn/string_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/setup.cc
diff --git a/tools/gn/setup.cc b/tools/gn/setup.cc
index 966150614915aca0f5f177bdcbe25a1bc45377e2..384a2af17eaaa00368fbc8d0dfccc64f1fd2df86 100644
--- a/tools/gn/setup.cc
+++ b/tools/gn/setup.cc
@@ -140,7 +140,7 @@ base::FilePath FindDotFile(const base::FilePath& current_dir) {
// Called on any thread. Post the item to the builder on the main thread.
void ItemDefinedCallback(base::MessageLoop* main_loop,
scoped_refptr<Builder> builder,
- scoped_ptr<Item> item) {
+ std::unique_ptr<Item> item) {
DCHECK(item);
main_loop->PostTask(FROM_HERE, base::Bind(&Builder::ItemDefined, builder,
base::Passed(&item)));
@@ -199,7 +199,7 @@ base::FilePath FindWindowsPython() {
DWORD path_length = ::GetEnvironmentVariable(kPathEnvVarName, nullptr, 0);
if (path_length == 0)
return base::FilePath();
- scoped_ptr<base::char16[]> full_path(new base::char16[path_length]);
+ std::unique_ptr<base::char16[]> full_path(new base::char16[path_length]);
DWORD actual_path_length =
::GetEnvironmentVariable(kPathEnvVarName, full_path.get(), path_length);
CHECK_EQ(path_length, actual_path_length + 1);
@@ -712,7 +712,7 @@ bool Setup::FillOtherConfig(const base::CommandLine& cmdline) {
err.PrintToStdout();
return false;
}
- scoped_ptr<std::set<SourceFile>> whitelist(new std::set<SourceFile>);
+ std::unique_ptr<std::set<SourceFile>> whitelist(new std::set<SourceFile>);
for (const auto& item : exec_script_whitelist_value->list_value()) {
if (!item.VerifyTypeIs(Value::STRING, &err)) {
err.PrintToStdout();
« no previous file with comments | « tools/gn/setup.h ('k') | tools/gn/string_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698