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

Side by Side Diff: tools/gn/item.cc

Issue 56433003: GN threading refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/item.h ('k') | tools/gn/item_node.h » ('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 #include "tools/gn/item.h" 5 #include "tools/gn/item.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 Item::Item(const Settings* settings, const Label& label) 9 Item::Item(const Settings* settings, const Label& label)
10 : settings_(settings), 10 : settings_(settings),
11 label_(label) { 11 label_(label),
12 defined_from_(NULL) {
12 } 13 }
13 14
14 Item::~Item() { 15 Item::~Item() {
15 } 16 }
16 17
17 Config* Item::AsConfig() { return NULL; } 18 Config* Item::AsConfig() { return NULL; }
18 const Config* Item::AsConfig() const { return NULL; } 19 const Config* Item::AsConfig() const { return NULL; }
19 Target* Item::AsTarget() { return NULL; } 20 Target* Item::AsTarget() { return NULL; }
20 const Target* Item::AsTarget() const { return NULL; } 21 const Target* Item::AsTarget() const { return NULL; }
21 Toolchain* Item::AsToolchain() { return NULL; } 22 Toolchain* Item::AsToolchain() { return NULL; }
22 const Toolchain* Item::AsToolchain() const { return NULL; } 23 const Toolchain* Item::AsToolchain() const { return NULL; }
23 24
24 std::string Item::GetItemTypeName() const { 25 std::string Item::GetItemTypeName() const {
25 if (AsConfig()) 26 if (AsConfig())
26 return "config"; 27 return "config";
27 if (AsTarget()) 28 if (AsTarget())
28 return "target"; 29 return "target";
29 if (AsToolchain()) 30 if (AsToolchain())
30 return "toolchain"; 31 return "toolchain";
31 NOTREACHED(); 32 NOTREACHED();
32 return "this thing that I have no idea what it is"; 33 return "this thing that I have no idea what it is";
33 } 34 }
OLDNEW
« no previous file with comments | « tools/gn/item.h ('k') | tools/gn/item_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698