VacuumManager.h (1067B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ : 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 mozilla_storage_VacuumManager_h__ 8 #define mozilla_storage_VacuumManager_h__ 9 10 #include "nsCOMPtr.h" 11 #include "nsIObserver.h" 12 #include "mozIStorageVacuumParticipant.h" 13 #include "nsCategoryCache.h" 14 15 namespace mozilla { 16 namespace storage { 17 18 class VacuumManager final : public nsIObserver { 19 public: 20 NS_DECL_ISUPPORTS 21 NS_DECL_NSIOBSERVER 22 23 VacuumManager(); 24 25 /** 26 * Obtains the VacuumManager object. 27 */ 28 static already_AddRefed<VacuumManager> getSingleton(); 29 30 private: 31 ~VacuumManager(); 32 33 static VacuumManager* gVacuumManager; 34 35 // Cache of components registered in "vacuum-participant" category. 36 nsCategoryCache<mozIStorageVacuumParticipant> mParticipants; 37 }; 38 39 } // namespace storage 40 } // namespace mozilla 41 42 #endif