| 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 #include "platform/network/NetworkInstrumentation.h" | 5 #include "platform/network/NetworkInstrumentation.h" |
| 6 | 6 |
| 7 #include "base/trace_event/trace_event.h" | 7 #include "base/trace_event/trace_event.h" |
| 8 #include "platform/instrumentation/tracing/TracedValue.h" | 8 #include "platform/instrumentation/tracing/TracedValue.h" |
| 9 #include "platform/network/ResourceLoadPriority.h" | 9 #include "platform/loader/fetch/ResourceLoadPriority.h" |
| 10 #include "platform/network/ResourceRequest.h" | 10 #include "platform/loader/fetch/ResourceRequest.h" |
| 11 | 11 |
| 12 namespace network_instrumentation { | 12 namespace network_instrumentation { |
| 13 | 13 |
| 14 using network_instrumentation::RequestOutcome; | 14 using network_instrumentation::RequestOutcome; |
| 15 using blink::TracedValue; | 15 using blink::TracedValue; |
| 16 | 16 |
| 17 const char kBlinkResourceID[] = "BlinkResourceID"; | 17 const char kBlinkResourceID[] = "BlinkResourceID"; |
| 18 const char kResourceLoadTitle[] = "ResourceLoad"; | 18 const char kResourceLoadTitle[] = "ResourceLoad"; |
| 19 const char kResourcePrioritySetTitle[] = "ResourcePrioritySet"; | 19 const char kResourcePrioritySetTitle[] = "ResourcePrioritySet"; |
| 20 const char kNetInstrumentationCategory[] = TRACE_DISABLED_BY_DEFAULT("network"); | 20 const char kNetInstrumentationCategory[] = TRACE_DISABLED_BY_DEFAULT("network"); |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 88 } |
| 89 | 89 |
| 90 void endResourceLoad(unsigned long resourceID, RequestOutcome outcome) { | 90 void endResourceLoad(unsigned long resourceID, RequestOutcome outcome) { |
| 91 TRACE_EVENT_NESTABLE_ASYNC_END1( | 91 TRACE_EVENT_NESTABLE_ASYNC_END1( |
| 92 kNetInstrumentationCategory, kResourceLoadTitle, | 92 kNetInstrumentationCategory, kResourceLoadTitle, |
| 93 TRACE_ID_WITH_SCOPE(kBlinkResourceID, TRACE_ID_LOCAL(resourceID)), | 93 TRACE_ID_WITH_SCOPE(kBlinkResourceID, TRACE_ID_LOCAL(resourceID)), |
| 94 "endData", endResourceLoadData(outcome)); | 94 "endData", endResourceLoadData(outcome)); |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace network_instrumentation | 97 } // namespace network_instrumentation |
| OLD | NEW |