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

Unified Diff: tools/gn/loader_unittest.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/loader.cc ('k') | tools/gn/ninja_binary_target_writer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/loader_unittest.cc
diff --git a/tools/gn/loader_unittest.cc b/tools/gn/loader_unittest.cc
index 6496eaaa61ee7aa41e8da43254bd6c9aeb524164..47d0f80d5f99a30fe3cbdea5c6d82e8fe9769bbf 100644
--- a/tools/gn/loader_unittest.cc
+++ b/tools/gn/loader_unittest.cc
@@ -40,9 +40,9 @@ class MockInputFileManager {
private:
struct CannedResult {
- scoped_ptr<InputFile> input_file;
+ std::unique_ptr<InputFile> input_file;
std::vector<Token> tokens;
- scoped_ptr<ParseNode> root;
+ std::unique_ptr<ParseNode> root;
};
bool AsyncLoadFile(const LocationRange& origin,
@@ -54,7 +54,7 @@ class MockInputFileManager {
return true;
}
- typedef std::map<SourceFile, scoped_ptr<CannedResult> > CannedResponseMap;
+ typedef std::map<SourceFile, std::unique_ptr<CannedResult>> CannedResponseMap;
CannedResponseMap canned_responses_;
std::vector< std::pair<SourceFile, Callback> > pending_;
@@ -68,7 +68,7 @@ LoaderImpl::AsyncLoadFileCallback MockInputFileManager::GetCallback() {
// Sets a given response for a given source file.
void MockInputFileManager::AddCannedResponse(const SourceFile& source_file,
const std::string& source) {
- scoped_ptr<CannedResult> canned(new CannedResult);
+ std::unique_ptr<CannedResult> canned(new CannedResult);
canned->input_file.reset(new InputFile(source_file));
canned->input_file->SetContents(source);
« no previous file with comments | « tools/gn/loader.cc ('k') | tools/gn/ninja_binary_target_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698