chromium/components/feed/content/renderer/rss_link_reader.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {

// Maximum number of RSS URLs to read.
constexpr int kMaxRssUrls =;

// Returns the RSS URL embedded in `link_element`, or any empty GURL if no RSS
// url is contained. This code is based on this internal implementation:
// http://shortn/_PIHj2svUjF
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) {}

}  // namespace

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) {}

}  // namespace feed