Files
sousa-gecko/toolkit/components/content-classifier/nsIContentClassifierRemoteSettingsClient.idl
Benjamin VanderSloot 4817946198 Bug 2041767, part 1 - Remove redundant storage of uncompiled list in memory - r=timhuang
Instead of the RemoteSettings service pushing bytes to the
ContentClassifierService, it only pushes when updates happen. From
there, the ContentClassifierService decides, based on the active
features what it should do. Any data it needs from remote settings is
pulled from the disk cache there.

Differential Revision: https://phabricator.services.mozilla.com/D304536
2026-06-11 15:53:57 +00:00

41 lines
1.5 KiB
Plaintext

/* 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/. */
#include "nsISupports.idl"
interface nsIContentClassifierService;
/**
* RemoteSettings client for the content classifier. Owns the filter
* list bytes (via the RS attachments cache on disk), notifies the C++
* service when lists change, and serves the bytes back on demand.
*/
[scriptable, uuid(C7DDDBF2-8BC4-41A1-AC90-5144BEC5ABDF)]
interface nsIContentClassifierRemoteSettingsClient : nsISupports {
/**
* Initialize the client. Registers the sync listener, ensures
* existing attachments are downloaded into the local cache, and
* notifies the service of every list found via onListUpdated.
* Resolves once the initial import has finished (or failed).
*/
Promise init(in nsIContentClassifierService aService);
/**
* Shut down the client and unregister sync listeners.
*/
void shutdown();
/**
* Return a Promise that resolves to a Uint8Array containing the
* raw attachment bytes for the named list, sourced from the RS
* attachments cache. Rejects if no record with that name exists
* or its attachment cannot be obtained.
*/
Promise getListBytes(in ACString aName);
};
%{C++
#define NS_CONTENTCLASSIFIERREMOTESETTINGSCLIENT_CONTRACTID "@mozilla.org/content-classifier-rs-client;1"
%}