mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-07 03:38:51 +02:00
This new method fetches pending synced changes from the extension
storage store, and passes them to `storage.onChanged` listeners.
This allows extensions that listen for these events to know when a
sync happened, which Kinto supported as well.
To guard against misuse, this method is implemented on a separate
`mozISyncedExtensionStorageArea` interface. To avoid multiple
inheritance (if `mozI{Synced, Configurable}ExtensionStorageArea` both
inherited from `mozIExtensionStorageArea`, which base method is called
when?), both of these internal-ish interfaces now inherit from
`nsISupports` instead.
Finally, because `fetchPendingSyncChanges` can return changes for
multiple extensions, `mozIExtensionStorageListener.onChanged` now takes
the affected extension ID as its first argument.
Differential Revision: https://phabricator.services.mozilla.com/D76976
22 lines
929 B
Python
22 lines
929 B
Python
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
|
# vim: set filetype=python:
|
|
# 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/.
|
|
|
|
Classes = [
|
|
{
|
|
'cid': '{f1e424f2-67fe-4f69-a8f8-3993a71f44fa}',
|
|
'contract_ids': ['@mozilla.org/extensions/storage/internal/sync-area;1'],
|
|
'type': 'mozIExtensionStorageArea',
|
|
'headers': ['mozilla/extensions/storage/ExtensionStorageComponents.h'],
|
|
'constructor': 'mozilla::extensions::storage::NewSyncArea',
|
|
},
|
|
{
|
|
'cid': '{5b7047b4-fe17-4661-8e13-871402bc2023}',
|
|
'contract_ids': ['@mozilla.org/extensions/storage/sync;1'],
|
|
'jsm': 'resource://gre/modules/ExtensionStorageComponents.jsm',
|
|
'constructor': 'StorageSyncService',
|
|
'singleton': True,
|
|
},
|
|
]
|