Refactor LearnForSubresource to handle both uri and origin-based learning