Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NetworkInstrumentation_h | |
| 6 #define NetworkInstrumentation_h | |
| 7 | |
| 8 #include "platform/PlatformExport.h" | |
| 9 #include "platform/network/ResourceLoadPriority.h" | |
| 10 #include "platform/network/ResourceRequest.h" | |
|
caseq
2016/11/08 18:24:32
please forward declare here instead.
dproy
2016/11/09 20:44:00
Done.
| |
| 11 | |
| 12 namespace network_instrumentation { | |
| 13 | |
| 14 enum RequestOutcome { Success, Fail }; | |
| 15 | |
| 16 class PLATFORM_EXPORT ScopedResourceLoadTracker { | |
| 17 public: | |
| 18 ScopedResourceLoadTracker(unsigned long resourceID, | |
| 19 const blink::ResourceRequest&); | |
| 20 ~ScopedResourceLoadTracker(); | |
| 21 void doNotCloseSliceAtEndOfScope(); | |
| 22 | |
| 23 private: | |
| 24 bool closeSliceAtEndOfScope; | |
|
caseq
2016/11/08 18:24:32
use m_ prefix. Also, how about a more specific nam
dproy
2016/11/09 20:44:00
Done. I changed it to m_resourceLoadContinuesBeyon
| |
| 25 const unsigned long resourceID; | |
|
caseq
2016/11/08 18:24:32
m_resourceId
dproy
2016/11/09 20:44:00
Done.
| |
| 26 | |
| 27 DISALLOW_COPY_AND_ASSIGN(ScopedResourceLoadTracker); | |
| 28 }; | |
| 29 | |
| 30 void PLATFORM_EXPORT initialResourcePrioritySet(unsigned long resourceID, | |
| 31 blink::ResourceLoadPriority); | |
| 32 | |
| 33 void PLATFORM_EXPORT resourcePriorityChanged(unsigned long resourceID, | |
| 34 blink::ResourceLoadPriority); | |
| 35 | |
| 36 void PLATFORM_EXPORT endResourceLoad(unsigned long resourceID, RequestOutcome); | |
| 37 | |
| 38 const char* RequestOutcomeToString(RequestOutcome); | |
|
caseq
2016/11/08 18:24:32
do we need to expose this one?
dproy
2016/11/09 20:44:00
Nope - thanks for pointing this out.
| |
| 39 | |
| 40 } // namespace network_instrumentation | |
| 41 | |
| 42 #endif // NetworkInstrumentation_h | |
| OLD | NEW |