// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_DECORATORS_SITE_DATA_RECORDER_H_ #define COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_DECORATORS_SITE_DATA_RECORDER_H_ #include <memory> #include "base/sequence_checker.h" #include "components/performance_manager/public/graph/graph.h" #include "components/performance_manager/public/graph/page_node.h" namespace performance_manager { class SiteDataReader; class SiteDataWriter; class SiteDataCache; // Policy class implementing heuristics that are checked by SiteDataRecorder. // This can be overridden in tests to change the definition of the heuristics, // for example to ignore timeouts. The default production versions of the // heuristics are available in static methods. class SiteDataRecorderHeuristics { … }; // The SiteDataRecorder decorator is responsible for adorning PageNodes with a // SiteDataReader and a SiteDataWriter and for forwarding the event of interest // to this writer. class SiteDataRecorder : public GraphOwned, public PageNode::ObserverDefaultImpl { … }; // Allows retrieving the SiteDataWriter and SiteDataReader associated with a // PageNode. class SiteDataRecorder::Data { … }; } // namespace performance_manager #endif // COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_DECORATORS_SITE_DATA_RECORDER_H_