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

Side by Side Diff: tools/gn/builder.h

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 unified diff | Download patch
« no previous file with comments | « tools/gn/build_settings.cc ('k') | tools/gn/builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TOOLS_GN_BUILDER_H_ 5 #ifndef TOOLS_GN_BUILDER_H_
6 #define TOOLS_GN_BUILDER_H_ 6 #define TOOLS_GN_BUILDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 15 matching lines...) Expand all
26 explicit Builder(Loader* loader); 26 explicit Builder(Loader* loader);
27 27
28 // The resolved callback is called whenever a target has been resolved. This 28 // The resolved callback is called whenever a target has been resolved. This
29 // will be executed only on the main thread. 29 // will be executed only on the main thread.
30 void set_resolved_callback(const ResolvedCallback& cb) { 30 void set_resolved_callback(const ResolvedCallback& cb) {
31 resolved_callback_ = cb; 31 resolved_callback_ = cb;
32 } 32 }
33 33
34 Loader* loader() const { return loader_; } 34 Loader* loader() const { return loader_; }
35 35
36 void ItemDefined(scoped_ptr<Item> item); 36 void ItemDefined(std::unique_ptr<Item> item);
37 37
38 // Returns NULL if there is not a thing with the corresponding label. 38 // Returns NULL if there is not a thing with the corresponding label.
39 const Item* GetItem(const Label& label) const; 39 const Item* GetItem(const Label& label) const;
40 const Toolchain* GetToolchain(const Label& label) const; 40 const Toolchain* GetToolchain(const Label& label) const;
41 41
42 std::vector<const BuilderRecord*> GetAllRecords() const; 42 std::vector<const BuilderRecord*> GetAllRecords() const;
43 43
44 // Returns targets which should be generated and which are defined. 44 // Returns targets which should be generated and which are defined.
45 std::vector<const Target*> GetAllResolvedTargets() const; 45 std::vector<const Target*> GetAllResolvedTargets() const;
46 46
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // Owning pointers. 132 // Owning pointers.
133 typedef base::hash_map<Label, BuilderRecord*> RecordMap; 133 typedef base::hash_map<Label, BuilderRecord*> RecordMap;
134 RecordMap records_; 134 RecordMap records_;
135 135
136 ResolvedCallback resolved_callback_; 136 ResolvedCallback resolved_callback_;
137 137
138 DISALLOW_COPY_AND_ASSIGN(Builder); 138 DISALLOW_COPY_AND_ASSIGN(Builder);
139 }; 139 };
140 140
141 #endif // TOOLS_GN_BUILDER_H_ 141 #endif // TOOLS_GN_BUILDER_H_
OLDNEW
« no previous file with comments | « tools/gn/build_settings.cc ('k') | tools/gn/builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698