#include "components/webapps/browser/web_contents/web_app_url_loader.h"
#include <memory>
#include <utility>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/memory/weak_ptr.h"
#include "base/metrics/histogram_functions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/timer/timer.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/url_constants.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_status_code.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "url/gurl.h"
#include "url/url_constants.h"
namespace webapps {
namespace {
UrlComparison;
bool EqualsWithComparison(const GURL& a,
const GURL& b,
UrlComparison url_comparison) { … }
bool WebContentsShuttingDown(content::WebContents* web_contents) { … }
class LoaderTask : public content::WebContentsObserver { … };
}
WebAppUrlLoader::WebAppUrlLoader() = default;
WebAppUrlLoader::~WebAppUrlLoader() = default;
void WebAppUrlLoader::LoadUrl(
content::NavigationController::LoadURLParams load_url_params,
content::WebContents* web_contents,
UrlComparison url_comparison,
ResultCallback callback) { … }
void WebAppUrlLoader::LoadUrl(const GURL& url,
content::WebContents* web_contents,
UrlComparison url_comparison,
ResultCallback callback) { … }
void WebAppUrlLoader::PrepareForLoad(content::WebContents* web_contents,
base::OnceClosure complete) { … }
void WebAppUrlLoader::LoadUrlInternal(
const content::NavigationController::LoadURLParams& load_url_params,
base::WeakPtr<content::WebContents> web_contents,
UrlComparison url_comparison,
ResultCallback callback) { … }
const char* ConvertUrlLoaderResultToString(WebAppUrlLoader::Result result) { … }
}