This source file includes following definitions.
- Destruct
- thread_id_
- thread_id_
#include "components/keyed_service/content/refcounted_browser_context_keyed_service.h"
namespace impl {
void RefcountedBrowserContextKeyedServiceTraits::Destruct(
const RefcountedBrowserContextKeyedService* obj) {
if (obj->requires_destruction_on_thread_ &&
!content::BrowserThread::CurrentlyOn(obj->thread_id_)) {
content::BrowserThread::DeleteSoon(obj->thread_id_, FROM_HERE, obj);
} else {
delete obj;
}
}
}
RefcountedBrowserContextKeyedService::RefcountedBrowserContextKeyedService()
: requires_destruction_on_thread_(false),
thread_id_(content::BrowserThread::UI) {}
RefcountedBrowserContextKeyedService::RefcountedBrowserContextKeyedService(
const content::BrowserThread::ID thread_id)
: requires_destruction_on_thread_(true), thread_id_(thread_id) {}
RefcountedBrowserContextKeyedService::~RefcountedBrowserContextKeyedService() {}