blob: e427dfad6bdcf6bf505da8f52a0e9106392acc9a [file] [log] [blame]
// Copyright 2016 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.
#ifndef WebLoadingBehaviorFlag_h
#define WebLoadingBehaviorFlag_h
namespace blink {
// This enum tracks certain behavior Blink exhibits when loading a page. This is
// for use in metrics collection by the loading team, to evaluate experimental
// features and potential areas of improvement in the loading stack. The main
// consumer is the page_load_metrics component, which sends bit flags to the
// browser process for histogram splitting.
enum WebLoadingBehaviorFlag {
kWebLoadingBehaviorNone = 0,
// Indicates that the page used the document.write evaluator to preload scan
// for resources inserted via document.write.
// DEPRECATED, feature has been turned down.
kWebLoadingBehaviorDocumentWriteEvaluator = 1 << 0,
// Indicates that the page is controlled by a Service Worker.
kWebLoadingBehaviorServiceWorkerControlled = 1 << 1,
// Indicates that the page has a synchronous, cross-origin document.written
// script.
kWebLoadingBehaviorDocumentWriteBlock = 1 << 2,
// Indicates that the page is a reload and has a synchronous, cross-origin
// document.written script.
kWebLoadingBehaviorDocumentWriteBlockReload = 1 << 3,
// The page loaded external CSS that generated a PreloadRequest via the
// CSSPreloaderResourceClient.
kWebLoadingBehaviorCSSPreloadFound = 1 << 4,
// Indicates that the page has a synchronous, same-origin document.written
// script with different protocol.
kWebLoadingBehaviorDocumentWriteBlockDifferentScheme = 1 << 5,
// Indicates that a subresource on the page matched the subresource filtering
// rules.
kWebLoadingBehaviorSubresourceFilterMatch = 1 << 6
};
} // namespace blink
#endif // WebLoadingBehaviorFlag_h