OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebLoadingBehaviorFlag_h | 5 #ifndef WebLoadingBehaviorFlag_h |
6 #define WebLoadingBehaviorFlag_h | 6 #define WebLoadingBehaviorFlag_h |
7 | 7 |
8 namespace blink { | 8 namespace blink { |
9 | 9 |
10 // This enum tracks certain behavior Blink exhibits when loading a page. This is | 10 // This enum tracks certain behavior Blink exhibits when loading a page. This is |
11 // for use in metrics collection by the loading team, to evaluate experimental | 11 // for use in metrics collection by the loading team, to evaluate experimental |
12 // features and potential areas of improvement in the loading stack. The main | 12 // features and potential areas of improvement in the loading stack. The main |
13 // consumer is the page_load_metrics component, which sends bit flags to the | 13 // consumer is the page_load_metrics component, which sends bit flags to the |
14 // browser process for histogram splitting. | 14 // browser process for histogram splitting. |
15 enum WebLoadingBehaviorFlag { | 15 enum WebLoadingBehaviorFlag { |
16 WebLoadingBehaviorNone = 0, | 16 WebLoadingBehaviorNone = 0, |
17 // Indicates that the page used the document.write evaluator to preload scan f
or resources inserted via document.write. | 17 // Indicates that the page used the document.write evaluator to preload scan |
| 18 // for resources inserted via document.write. |
18 WebLoadingBehaviorDocumentWriteEvaluator = 1 << 0, | 19 WebLoadingBehaviorDocumentWriteEvaluator = 1 << 0, |
19 // Indicates that the page is controlled by a Service Worker. | 20 // Indicates that the page is controlled by a Service Worker. |
20 WebLoadingBehaviorServiceWorkerControlled = 1 << 1, | 21 WebLoadingBehaviorServiceWorkerControlled = 1 << 1, |
21 // Indicates that the page has a synchronous, cross-origin document.written | 22 // Indicates that the page has a synchronous, cross-origin document.written |
22 // script. | 23 // script. |
23 WebLoadingBehaviorDocumentWriteBlock = 1 << 2, | 24 WebLoadingBehaviorDocumentWriteBlock = 1 << 2, |
24 // Indicates that the page is a reload and has a synchronous, cross-origin doc
ument.written | 25 // Indicates that the page is a reload and has a synchronous, cross-origin |
25 // script. | 26 // document.written script. |
26 WebLoadingBehaviorDocumentWriteBlockReload = 1 << 3, | 27 WebLoadingBehaviorDocumentWriteBlockReload = 1 << 3, |
27 // The page loaded external CSS that generated a PreloadRequest via the | 28 // The page loaded external CSS that generated a PreloadRequest via the |
28 // CSSPreloaderResourceClient. | 29 // CSSPreloaderResourceClient. |
29 WebLoadingBehaviorCSSPreloadFound = 1 << 4, | 30 WebLoadingBehaviorCSSPreloadFound = 1 << 4, |
30 }; | 31 }; |
31 | 32 |
32 } // namespace blink | 33 } // namespace blink |
33 | 34 |
34 #endif // WebLoadingBehaviorFlag_h | 35 #endif // WebLoadingBehaviorFlag_h |
OLD | NEW |