Several gn classes have owning std::vector<T*> (or similar). It would be more idiomatic to use std::vector<std::unique_ptr<T>> (or similar), now that C++11 has arrived.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6ce99c7025ebaca2747f659da3700a388f627919 commit 6ce99c7025ebaca2747f659da3700a388f627919 Author: jbroman <jbroman@chromium.org> Date: Mon Apr 18 18:17:44 2016 GN: Replace vector<ParseNode*> with vector<unique_ptr<ParseNode>> in parse_tree.h. Chromium can now use std::unique_ptr. BUG= 602726 Review URL: https://codereview.chromium.org/1884503003 Cr-Commit-Position: refs/heads/master@{#387958} [modify] https://crrev.com/6ce99c7025ebaca2747f659da3700a388f627919/tools/gn/command_format.cc [modify] https://crrev.com/6ce99c7025ebaca2747f659da3700a388f627919/tools/gn/function_foreach.cc [modify] https://crrev.com/6ce99c7025ebaca2747f659da3700a388f627919/tools/gn/function_forward_variables_from.cc [modify] https://crrev.com/6ce99c7025ebaca2747f659da3700a388f627919/tools/gn/functions.cc [modify] https://crrev.com/6ce99c7025ebaca2747f659da3700a388f627919/tools/gn/parse_tree.cc [modify] https://crrev.com/6ce99c7025ebaca2747f659da3700a388f627919/tools/gn/parse_tree.h [modify] https://crrev.com/6ce99c7025ebaca2747f659da3700a388f627919/tools/gn/parser.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/647a1af223628bb4e15b69a29ca257477282b737 commit 647a1af223628bb4e15b69a29ca257477282b737 Author: jbroman <jbroman@chromium.org> Date: Mon Apr 18 20:14:08 2016 GN: Use std::unique_ptr for owned pointers in ImportManager. BUG= 602726 Review URL: https://codereview.chromium.org/1886453002 Cr-Commit-Position: refs/heads/master@{#387997} [modify] https://crrev.com/647a1af223628bb4e15b69a29ca257477282b737/tools/gn/import_manager.cc [modify] https://crrev.com/647a1af223628bb4e15b69a29ca257477282b737/tools/gn/import_manager.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ac5bf2c0d550e62f6cc58862990e7c4a1017cdf7 commit ac5bf2c0d550e62f6cc58862990e7c4a1017cdf7 Author: jbroman <jbroman@chromium.org> Date: Mon Apr 18 20:34:00 2016 GN: Use std::unique_ptr for owning pointers in Scope::NamedScopeMap. BUG= 602726 Review URL: https://codereview.chromium.org/1885513003 Cr-Commit-Position: refs/heads/master@{#388002} [modify] https://crrev.com/ac5bf2c0d550e62f6cc58862990e7c4a1017cdf7/tools/gn/scope.cc [modify] https://crrev.com/ac5bf2c0d550e62f6cc58862990e7c4a1017cdf7/tools/gn/scope.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f9b6b5ae0cd8396663e5c1b06468384fc9d89688 commit f9b6b5ae0cd8396663e5c1b06468384fc9d89688 Author: jbroman <jbroman@chromium.org> Date: Mon Apr 18 20:59:38 2016 GN: Use std::unique_ptr in Loader::ToolchainRecordMap. BUG= 602726 Review URL: https://codereview.chromium.org/1878353002 Cr-Commit-Position: refs/heads/master@{#388015} [modify] https://crrev.com/f9b6b5ae0cd8396663e5c1b06468384fc9d89688/tools/gn/loader.cc [modify] https://crrev.com/f9b6b5ae0cd8396663e5c1b06468384fc9d89688/tools/gn/loader.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/959ec4e4802a64b022d7101eafbc791a0339e971 commit 959ec4e4802a64b022d7101eafbc791a0339e971 Author: jbroman <jbroman@chromium.org> Date: Mon Apr 18 21:08:10 2016 GN: Use std::unique_ptr for owning pointers in InputFileManager. BUG= 602726 Review URL: https://codereview.chromium.org/1877253003 Cr-Commit-Position: refs/heads/master@{#388022} [modify] https://crrev.com/959ec4e4802a64b022d7101eafbc791a0339e971/tools/gn/input_file_manager.cc [modify] https://crrev.com/959ec4e4802a64b022d7101eafbc791a0339e971/tools/gn/input_file_manager.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/31500019dff1f12beb9731da14db3820cba2b991 commit 31500019dff1f12beb9731da14db3820cba2b991 Author: jbroman <jbroman@chromium.org> Date: Mon Apr 18 21:22:18 2016 GN: Use std::unique_ptr for owned pointers in VisualStudioWriter. BUG= 602726 Review URL: https://codereview.chromium.org/1883593004 Cr-Commit-Position: refs/heads/master@{#388031} [modify] https://crrev.com/31500019dff1f12beb9731da14db3820cba2b991/tools/gn/visual_studio_writer.cc [modify] https://crrev.com/31500019dff1f12beb9731da14db3820cba2b991/tools/gn/visual_studio_writer.h [modify] https://crrev.com/31500019dff1f12beb9731da14db3820cba2b991/tools/gn/visual_studio_writer_unittest.cc
Comment 1 by bugdroid1@chromium.org
, Apr 18 2016