Quellcode-Bibliothek ChannelClassifierService.cpp
Sprache: C
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* 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/. */
// Get top-level browsing context to ensure window global parent is ready // to use, tabId is the same anyway.
dom::CanonicalBrowsingContext* top = browsingContext->Canonical()->Top();
dom::WindowGlobalParent* wgp = top->GetCurrentWindowGlobal(); if (!wgp) { return NS_ERROR_FAILURE;
}
RefPtr<dom::BrowserParent> browserParent = wgp->GetBrowserParent(); if (!browserParent) { return NS_ERROR_FAILURE;
}
// Get top-level browsing context to ensure window global parent is ready // to use, tabId is the same anyway.
dom::CanonicalBrowsingContext* top = browsingContext->Canonical()->Top();
dom::WindowGlobalParent* wgp = top->GetCurrentWindowGlobal(); if (!wgp) { return NS_ERROR_FAILURE;
}
RefPtr<nsIURI> uri = wgp->GetDocumentURI(); if (!uri) { return NS_ERROR_FAILURE;
}
// Don't bother continuing if no one has ever registered listener if (!gChannelClassifierService || !gChannelClassifierService->HasListener()) { return ChannelBlockDecision::Blocked;
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.1Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.