tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

NetworkMarker.h (1612B)


      1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim:set et cin ts=4 sw=2 sts=2: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef NetworkMarker_h__
      8 #define NetworkMarker_h__
      9 
     10 #include "mozilla/ProfilerMarkers.h"
     11 #include "nsHttp.h"
     12 #include "nsICacheInfoChannel.h"
     13 #include "nsIClassOfService.h"
     14 
     15 namespace mozilla {
     16 namespace net {
     17 
     18 struct TimingStruct;
     19 
     20 enum class NetworkLoadType {
     21  LOAD_START,
     22  LOAD_STOP,
     23  LOAD_REDIRECT,
     24  LOAD_CANCEL
     25 };
     26 
     27 void profiler_add_network_marker(
     28    nsIURI* aURI, const nsACString& aRequestMethod, int32_t aPriority,
     29    uint64_t aChannelId, NetworkLoadType aType, mozilla::TimeStamp aStart,
     30    mozilla::TimeStamp aEnd, int64_t aCount,
     31    nsICacheInfoChannel::CacheDisposition aCacheDisposition,
     32    uint64_t aInnerWindowID, bool aIsPrivateBrowsing,
     33    nsIClassOfService* aClassOfService, nsresult aRequestStatus,
     34    const mozilla::net::TimingStruct* aTimings = nullptr,
     35    mozilla::UniquePtr<mozilla::ProfileChunkedBuffer> aSource = nullptr,
     36    const mozilla::Maybe<mozilla::net::HttpVersion> aHttpVersion =
     37        mozilla::Nothing(),
     38    const mozilla::Maybe<uint32_t> aResponseStatus = mozilla::Nothing(),
     39    const mozilla::Maybe<nsDependentCString>& aContentType = mozilla::Nothing(),
     40    nsIURI* aRedirectURI = nullptr, uint32_t aRedirectFlags = 0,
     41    uint64_t aRedirectChannelId = 0);
     42 
     43 }  // namespace net
     44 }  // namespace mozilla
     45 
     46 #endif  // NetworkMarker_h__