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

Unified Diff: tools/gn/input_file_manager.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/input_file_manager.h ('k') | tools/gn/loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/input_file_manager.cc
diff --git a/tools/gn/input_file_manager.cc b/tools/gn/input_file_manager.cc
index de841010191f6492268e2c947dd689b01dcced15..a3e64606b0d81c6be47661767ed3f11967c23a80 100644
--- a/tools/gn/input_file_manager.cc
+++ b/tools/gn/input_file_manager.cc
@@ -27,7 +27,7 @@ bool DoLoadFile(const LocationRange& origin,
const SourceFile& name,
InputFile* file,
std::vector<Token>* tokens,
- scoped_ptr<ParseNode>* root,
+ std::unique_ptr<ParseNode>* root,
Err* err) {
// Do all of this stuff outside the lock. We should not give out file
// pointers until the read is complete.
@@ -226,10 +226,11 @@ const ParseNode* InputFileManager::SyncLoadFile(
return data->parsed_root.get();
}
-void InputFileManager::AddDynamicInput(const SourceFile& name,
- InputFile** file,
- std::vector<Token>** tokens,
- scoped_ptr<ParseNode>** parse_root) {
+void InputFileManager::AddDynamicInput(
+ const SourceFile& name,
+ InputFile** file,
+ std::vector<Token>** tokens,
+ std::unique_ptr<ParseNode>** parse_root) {
InputFileData* data = new InputFileData(name);
{
base::AutoLock lock(lock_);
@@ -270,7 +271,7 @@ bool InputFileManager::LoadFile(const LocationRange& origin,
InputFile* file,
Err* err) {
std::vector<Token> tokens;
- scoped_ptr<ParseNode> root;
+ std::unique_ptr<ParseNode> root;
bool success = DoLoadFile(origin, build_settings, name, file,
&tokens, &root, err);
// Can't return early. We have to ensure that the completion event is
« no previous file with comments | « tools/gn/input_file_manager.h ('k') | tools/gn/loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698