blob: 4a25e74aa5db39aa73e69194f9ada76431679c81 [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/performance_manager/public/graph/node.h"
#include "chrome/browser/performance_manager/graph/node_base.h"
namespace performance_manager {
Node::Node() = default;
Node::~Node() = default;
// static
int64_t Node::GetSerializationId(const Node* node) {
if (!node)
return 0;
// This const_cast is unfortunate, but the process of assigning a
// serialization ID to a node doesn't change it semantically.
const NodeBase* node_base = NodeBase::FromNode(node);
return NodeBase::GetSerializationId(const_cast<NodeBase*>(node_base));
}
} // namespace performance_manager