GroupInfoPair.cpp (928B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 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 file, 5 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #include "GroupInfoPair.h" 8 9 namespace mozilla::dom::quota { 10 11 RefPtr<GroupInfo>& GroupInfoPair::GetGroupInfoForPersistenceType( 12 PersistenceType aPersistenceType) { 13 switch (aPersistenceType) { 14 case PERSISTENCE_TYPE_TEMPORARY: 15 return mTemporaryStorageGroupInfo; 16 case PERSISTENCE_TYPE_DEFAULT: 17 return mDefaultStorageGroupInfo; 18 case PERSISTENCE_TYPE_PRIVATE: 19 return mPrivateStorageGroupInfo; 20 21 case PERSISTENCE_TYPE_PERSISTENT: 22 case PERSISTENCE_TYPE_INVALID: 23 default: 24 MOZ_CRASH("Bad persistence type value!"); 25 } 26 } 27 28 } // namespace mozilla::dom::quota