#include "components/feed/content/renderer/rss_link_reader.h"
#include <string>
#include "base/metrics/histogram_functions.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "components/feed/mojom/rss_link_reader.mojom.h"
#include "content/public/renderer/render_frame.h"
#include "services/service_manager/public/cpp/binder_registry.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_element.h"
#include "third_party/blink/public/web/web_element_collection.h"
#include "third_party/blink/public/web/web_local_frame.h"
namespace feed {
namespace {
constexpr int kMaxRssUrls = …;
GURL GetRssUrlFromLinkElement(const blink::WebElement& link_element) { … }
void AddRssLinksFromElement(const blink::WebElement& element,
std::vector<GURL>* rss_urls) { … }
std::vector<GURL> GetRssLinksFromDocument(blink::WebDocument document) { … }
}
RssLinkReader::RssLinkReader(content::RenderFrame* render_frame,
service_manager::BinderRegistry* registry)
: … { … }
RssLinkReader::~RssLinkReader() = default;
void RssLinkReader::GetRssLinks(GetRssLinksCallback callback) { … }
void RssLinkReader::OnDestruct() { … }
void RssLinkReader::BindReceiver(
mojo::PendingReceiver<mojom::RssLinkReader> receiver) { … }
}