DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Implementation

Mercurial (d38398e5144e)

VCS Links

FreeRustURL

RustURL

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef RustURL_h__
#define RustURL_h__

#include "nsISerializable.h"
#include "nsIFileURL.h"
#include "nsIStandardURL.h"
#include "nsIClassInfo.h"
#include "nsISizeOf.h"
#include "nsIIPCSerializableURI.h"
#include "nsISensitiveInfoHiddenURI.h"

#include "rust-url-capi/src/rust-url-capi.h"
#include "mozilla/UniquePtr.h"

namespace mozilla {
namespace net {

class RustURL
  : public nsIFileURL
  , public nsIStandardURL
  , public nsISerializable
  , public nsIClassInfo
  , public nsISizeOf
  , public nsIIPCSerializableURI
  , public nsISensitiveInfoHiddenURI
{
  NS_DECL_ISUPPORTS
  NS_DECL_NSIURI
  NS_DECL_NSIURL
  NS_DECL_NSIFILEURL
  NS_DECL_NSISTANDARDURL
  NS_DECL_NSISERIALIZABLE
  NS_DECL_NSICLASSINFO
  NS_DECL_NSIMUTABLE
  NS_DECL_NSIIPCSERIALIZABLEURI
  NS_DECL_NSISENSITIVEINFOHIDDENURI

  RustURL();
  // nsISizeOf
  virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override;
  virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override;
private:
  virtual ~RustURL();

  struct FreeRustURL { void operator()(rusturl* aPtr) { rusturl_free(aPtr); } };
  mutable mozilla::UniquePtr<rusturl, FreeRustURL> mURL;

  bool mMutable;
};

} // namespace net
} // namespace mozilla

#endif // RustURL_h__