// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_LOCAL_NETWORK_REQUESTS_PAGE_LOAD_METRICS_OBSERVER_H_ #define CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_LOCAL_NETWORK_REQUESTS_PAGE_LOAD_METRICS_OBSERVER_H_ #include <map> #include <memory> #include <string> #include <utility> #include "components/page_load_metrics/browser/page_load_metrics_observer.h" #include "net/base/ip_address.h" namespace internal { // The domain type of the IP address of the loaded page. We use these to // determine what classes of resource request metrics to collect. enum DomainType { … }; // The type of the IP address of the loaded resource. enum ResourceType { … }; // The types of services to distinguish between when collecting local network // request metrics. enum PortType { … }; // For simple access during UMA histogram logging, the names are in a // multidimensional map indexed by [DomainType][ResourceType][Status]. const std::map<DomainType, std::map<ResourceType, std::map<bool, std::string>>>& GetNonlocalhostHistogramNames(); // For localhost histogram names, the map is indexed by // [DomainType][PortType][Status]. const std::map<DomainType, std::map<PortType, std::map<bool, std::string>>>& GetLocalhostHistogramNames(); } // namespace internal // This observer is for observing local network requests. // TODO(uthakore): Add description. class LocalNetworkRequestsPageLoadMetricsObserver : public page_load_metrics::PageLoadMetricsObserver { … }; #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_LOCAL_NETWORK_REQUESTS_PAGE_LOAD_METRICS_OBSERVER_H_