phdFilter * phdFilterManager::registerFilter(phdFilter * _item) { int _index = indexOf(_item); if(_index == -1) { phdFilter * _filter = findByFileName(_item->getFileName()); if(_filter != NULL) return _filter; items.push_back(_item); return _item; } return items[_index]; }
void InspectorDatabaseAgent::didOpenDatabase(RefPtr<Database>&& database, const String& domain, const String& name, const String& version) { if (auto* resource = findByFileName(database->fileName())) { resource->setDatabase(WTFMove(database)); return; } auto resource = InspectorDatabaseResource::create(WTFMove(database), domain, name, version); m_resources.add(resource->id(), resource.ptr()); // Resources are only bound while visible. if (m_enabled) resource->bind(m_frontendDispatcher.get()); }
void InspectorDatabaseAgent::didOpenDatabase(PassRefPtr<Database> database, const String& domain, const String& name, const String& version) { if (InspectorDatabaseResource* resource = findByFileName(database->fileName())) { resource->setDatabase(database); return; } RefPtr<InspectorDatabaseResource> resource = InspectorDatabaseResource::create(database, domain, name, version); m_resources.set(resource->id(), resource); // Resources are only bound while visible. if (m_frontendProvider && m_enabled) resource->bind(m_frontendProvider->frontend()); }
void InspectorDatabaseAgent::didOpenDatabase(blink::Database* database, const String& domain, const String& name, const String& version) { if (InspectorDatabaseResource* resource = findByFileName(database->fileName())) { resource->setDatabase(database); return; } InspectorDatabaseResource* resource = InspectorDatabaseResource::create(database, domain, name, version); m_resources.set(resource->id(), resource); // Resources are only bound while visible. ASSERT(m_enabled && frontend()); resource->bind(frontend()); }