blob: a9605307c1844dbb4487d9929aebfec56369e3b8 [file] [log] [blame]
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_UI_MANAGER_DELEGATE_H_
#define CHROME_BROWSER_SAFE_BROWSING_CHROME_UI_MANAGER_DELEGATE_H_
#include "chrome/browser/safe_browsing/ui_manager.h"
namespace safe_browsing {
// Provides embedder-specific logic for SafeBrowsingUIManager.
class ChromeSafeBrowsingUIManagerDelegate
: public SafeBrowsingUIManager::Delegate {
public:
ChromeSafeBrowsingUIManagerDelegate();
~ChromeSafeBrowsingUIManagerDelegate() override;
ChromeSafeBrowsingUIManagerDelegate(
const ChromeSafeBrowsingUIManagerDelegate&) = delete;
ChromeSafeBrowsingUIManagerDelegate& operator=(
const ChromeSafeBrowsingUIManagerDelegate&) = delete;
// SafeBrowsingUIManager::Delegate:
const std::string& GetApplicationLocale() override;
void TriggerSecurityInterstitialShownExtensionEventIfDesired(
content::WebContents* web_contents,
const GURL& page_url,
const std::string& reason,
int net_error_code) override;
void TriggerSecurityInterstitialProceededExtensionEventIfDesired(
content::WebContents* web_contents,
const GURL& page_url,
const std::string& reason,
int net_error_code) override;
prerender::NoStatePrefetchContents* GetNoStatePrefetchContentsIfExists(
content::WebContents* web_contents) override;
bool IsHostingExtension(content::WebContents* web_contents) override;
PrefService* GetPrefs(content::BrowserContext* browser_context) override;
history::HistoryService* GetHistoryService(
content::BrowserContext* browser_context) override;
PingManager* GetPingManagerIfExists() override;
scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory(
content::BrowserContext* browser_context) override;
bool IsMetricsAndCrashReportingEnabled() override;
};
} // namespace safe_browsing
#endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_UI_MANAGER_DELEGATE_H_