[Session restore] Rename group name Enabled to Restore.
[chromium-blink-merge.git] / tools / gn / item.cc
blobb0efd64ac0121e9f08e95e3b8736d981070d013f
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
3 // found in the LICENSE file.
5 #include "tools/gn/item.h"
7 #include "base/logging.h"
8 #include "tools/gn/settings.h"
10 Item::Item(const Settings* settings, const Label& label)
11 : settings_(settings), label_(label), defined_from_(nullptr) {
14 Item::~Item() {
17 Config* Item::AsConfig() {
18 return nullptr;
20 const Config* Item::AsConfig() const {
21 return nullptr;
23 Target* Item::AsTarget() {
24 return nullptr;
26 const Target* Item::AsTarget() const {
27 return nullptr;
29 Toolchain* Item::AsToolchain() {
30 return nullptr;
32 const Toolchain* Item::AsToolchain() const {
33 return nullptr;
36 std::string Item::GetItemTypeName() const {
37 if (AsConfig())
38 return "config";
39 if (AsTarget())
40 return "target";
41 if (AsToolchain())
42 return "toolchain";
43 NOTREACHED();
44 return "this thing that I have no idea what it is";
47 bool Item::OnResolved(Err* err) {
48 return true;